|
-
Apr 18th, 2006, 07:05 PM
#1
Thread Starter
PowerPoster
[RESOLVED] Dir() reentrancy?
I have a directory with about 30,000 files with a type, say, .xxx. Almost every one of these files has a file of type .yyy, type .zzz or type .yymmdd (where yymmdd is a date) associated with it.
I have to find each .xxx file that has an associated file and rename the .xxx file. Finding the file is easy, in a loop using Dir(). However, if I use Dir() within the loop to find the associated file, the outer loop's Dir() no longer works - it's not a reentrant function.
I can use fso.FindFile inside the loop, but FindFile doesn't accept wildcards, and the dates run from Jan. 1, 2005 to the current day, so the inner loop would execute over 14 million times, and I'm not sure I'll live long enough to see the results. Can anyone think of a more elegant way of doing this? Is there an API I can use that accepts wildcards and that isn't being used by the Dir() function? Am I overlooking a simple solution?
TIA
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|