Intelligent Automation & Macro Software  

Go Back   Automation Anywhere, Inc. Forums > Products Zone > Automation Anywhere
Register FAQ Search Today's Posts Mark Forums Read

Automation Anywhere Post messages and questions related to Automation Software here.


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-07-2007, 12:25 AM
Andy Sterner Andy Sterner is offline
Junior Member
 
Join Date: Jul 2007
Location: Brooklyn
Posts: 7
Default Test to See If There Are Any Folders In A Folder

I'm pursuing a will 'o the wisp. If I can determine that there are folders in a folder, then I want to run a loop for each folder; but if there are no folders, I don't want to run the loop. So I'm working on an If statement.

Quote:
1 Keystrokes: [ALT DOWN][TAB][ALT UP] in "Currently Active Window"
2 Keystrokes: [ALT DOWN]d[ALT UP][CTRL DOWN]c[CTRL UP] in "Currently Active Window"
3 Assign value of Clipboard to variable "$folderpathandname$
4 If Folder Exists("$folderpathandname$\*") Then (Wait up to 2 seconds - for Folder to exist)
5 Comment: Please enter the conditional commands here.
6 Message Box: "There is a folder in this folder."
7 End If
The first three lines capture the folder and path name of the current directory in a Windows Explorer window, and assign them to a variable, which I then use in an If statement using * as a wild card. The wild card doesn't seem to work. Is there something wrong with my syntax, or is there some other way to do what I want?

(The loop, by the way, would go where the message box command is now.)
__________________
--Baffled in Brooklyn
Reply With Quote
  #2 (permalink)  
Old 07-17-2007, 04:14 AM
navneet.soni navneet.soni is offline
Junior Member
 
Join Date: Jan 2007
Posts: 12
Default Re:Test to See If There Are Any Folders In A Folder

Wildcards will not work in the if condition. You don't need to check explicitly for the existance of folders in a folder prior to the loop Each folder in a folder as the loop will be executed only if there is a folder in a given folder.
Attached Files
File Type: atmn foldpath.atmn (1.7 KB, 1 views)
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -7. The time now is 09:14 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.0 ©2007, Crawlability, Inc.
Copyright © 2003-2011 Automation Anywhere, Inc. All rights reserved