I'm runing the following DOS commands using a batch file:
:: "/S - ADDS ALL SUBDIRECTORIES TO THE EXPORT"
:: "/Q - ADDS THE FILE OWNER TO THE LIST"
:: "/L - CONVERTS ALL FILE NAMES TO LOWERCASE"
DIR K: /S /Q /L > C:\TEMP\KDRIVE.TXT
Currently, I have to run this batch file as a seperate step. It takes over an hour for the batch file to run. I would like to incorporate this batch file routine into a *.prg, but, I need a way for my program to loop until the "kdrive.txt" file is completely built.
I'm using the following command to run the batch file: RUN [/N] MS-DOSCommand
If I leave out the "/N" argument, the program appears to timeout and the text file only gets partially built.
Can someone suggest the best way to determine when MS-DOS is finished building the text file? Perhaps an API call or low level file command.
The overall requirement of my program is to update a table containing every file located on a mapped network drive. We use this table in a FoxPro application which allows users to view their files in an easy manner and then easily clean up the network drive.
TIA,
Mike
Mike Coop
MIU - Data Analyst III
Kemper a Unitrin Business
(904) 245-5949
mcoop@eKemper.com