Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy Text File

Status
Not open for further replies.

gnosis13

Programmer
Jul 13, 2001
263
US
I know this has been covered using various different methods in many different threads but I just can't seem to get a grasp on how to handle this:

I have some lab equip that writes a text file every time it completes a sample and saves it like so:
C:\Samples\SIG10000.D\Report.txt
C:\Samples\SIG10001.D\Report.txt
etc.

I would like to parse the text file and save the data...no prob. However, the folder SIG... gets incremeted every time this thing runs a sample, but the filename never changes. Having the users go find the correct file has not worked well because they are all so similar and sometimes the folder gets set back to SIG10000.D so that your new data has a lower number than the old.

I would like to have my DB check the SAMPLES folder every 1 minutes and if a new folder has been added named SIG* then copy the text file out, rename it, save it to C:\REPORTS\ and move the old SIG* folder to say, C:\ARC. The reason that I need to save the SIG* folder is because it has other data in it that I don't have permission to destroy.

Any suggestions? I don't have much code yet, just playing with techniques. (Sorry so long...too much coffee)




A+, N+, MCP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top