SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Can wildcards be used with DirExists

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Can wildcards be used with DirExists
Author Message
DLUTER



Joined: 16 Mar 2007
Posts: 44
Country: United States

Post Can wildcards be used with DirExists Reply with quote
Here is my script

CD( "t:" )

ConcatEx( "T:\\", vDate, "*\\", vMask )
DirExists( vMask, vStatus )

DirExists( "t:\\07312007??????", vStatus )
DirExists( "t:\\07312007164408", vStatus )


When I try to use just vMask, it responds "False". When I use "??????" for wildcards it also returns "False". When I check the full name it comes back as "True". Is there a way to use DirExists or IsDir with a wildcard?

Thanks
Wed Aug 01, 2007 4:52 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7952

Post Reply with quote
DirExists doesn't support file masks. But you can use FileExists for this purpose. The only issue with this method, if there is a file with the name matching your search mask, FileExists is also going to return True.

Another way, fool-proof, is to use the SubDir for a parent directory to get a list of folders and then either loop through the list or use Match statement to search the returned for a specific name using the required pattern.
Wed Aug 01, 2007 5:17 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.