Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy files by date
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Copy files by date
Miscellaneous
Thread ID:
00736270
Message ID:
00736270
Views:
44
Hello,

I have several .txt files in a folder. I want to copy them to another folder based on the date on the file.

I know that I can use a command such as the following to copy all of the files from one folder to another folder:

COPY FILE C:\FOLDER1\*.txt TO C:\FOLDER2\*.txt

The question I have, is how do you selectively move through several files in a folder and only copy those with dates less than or equal to 5 days old.

I also want to delete the files that are greater than 5 days old.

The file names are programmatically created, so I do not know the file names. I only know that they are .txt files.
Thanks,

TFISHER
Next
Reply
Map
View

Click here to load this message in the networking platform