 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
DLUTER
Joined: 16 Mar 2007 Posts: 44 Country: United States |
|
Can wildcards be used with DirExists |
|
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 |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7952
|
|
|
|
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 |
|
 |
|
|
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
|
|
|