Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Searching for files
Message
From
10/04/2000 20:24:25
 
 
To
10/04/2000 12:28:10
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00357579
Message ID:
00357750
Views:
17
>I need to know the best approach to determine if a file or files exist for a given date. The following naming convention is used for the files:
>Am031700a
>Am031700b
>Pm031700a
>
>For any given day, there can be numerous Am and Pm files. The last letter of the file name distinguishes the files. The user will be prompted to enter a date range. The program will then need to search the specified directory for all files for that day. How can I look at every single file in the directory and compare the date portion of the filename to the date range the user entered? I know how to use the FILE() function. I need a way that is going to allow me to scan the entire directory and compare each file name.
>
>Thanks in advance for your assistance.

Look at ADIR() - it accepts a template that uses the same structure as the Win file wildcarding convention, and returns an array of files matching the template; you just spin through the array using a FOR loop...
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform