Terry
ADIR() will fill an array with filenames matching a file skeleton (eg *.TXT) and store file details including date and time in the array.
You can then go through this array in a FOR...NEXT loop and check file dates and process accordingly.
Jos
>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.
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.