Using wildcards in IfFileExists

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
GlenHart
Newbie
Posts: 4
Joined: Sun Jan 23, 2005 4:03 pm

Using wildcards in IfFileExists

Post by GlenHart » Wed Jan 26, 2005 3:28 pm

Hi,

Does any know if it is posible to use wildcards with the IfFileExists command. Such the I would have:

IfFileExists>C:\temp\*.*, FilesInDir, NoFileInDir

Thanks
Glen

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Wed Jan 26, 2005 3:54 pm

Nope.

chinadrum
Newbie
Posts: 2
Joined: Wed Jan 26, 2005 6:13 pm

Post by chinadrum » Wed Jan 26, 2005 6:18 pm

the getfilelist command looks like it could be used for what you are trying to do

//list all files separated by ;'s
GetFileList>c:\temp\*.*,files
//create an array of the file names
Separate>files,;,file_names
//print count of files
MessageModal>Num Files: %file_names_count%

you could then use your conditional around the file_names_count variable

-Scott

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Wed Jan 26, 2005 10:41 pm

Scott,

Thanks for sharing your ingenious programming tricks with us. Previously I thought it could only be done in VBscript.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts