Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checking for unprocessed files in a directory.
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00383649
Message ID:
00383665
Views:
35
>Hi,
>
>I need to write a program that looks in a directory and checks for text files that need to be processed in some way by FoxPro.
>I need to pick up only new files that have not been opened and processed by FoxPro previously.
>
>I'm figuring that using a tabel to hold the names of all processed files would be a start but how can I check for new files in a directory?
>
>Thanks for any help you can offer.
>
>Regards,
>Martin

Hi Martin,

Holding the names of processed files in a table is one way of doing it. If you're going that way, and your text files are going to be in a specific directory or directories, you could use ADIR() to transfer the contents of any directory to an array, and check the contents of the array against the filenames in your table that holds the names of your processed files.

If your checking code runs in a loop, any file which is not processed can be processed and your tabel updated in one go.

Regards,
Sanjay Kapoor

Relatively speaking is a conversation with Einstein
Previous
Reply
Map
View

Click here to load this message in the networking platform