File List sorted by date

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Cio

File List sorted by date

Post by Cio » Tue Apr 27, 2004 10:10 am

Hello.

I´m trying to obtain a list of all the files in a folder sorted by date.
I have already used the getfilelist but it works by name.

One idea was to use an array to write the name and the date and then sort it, but I can´t find if there´s any command to make it easy.

Thank you very much.

Lumumba

Post by Lumumba » Tue Apr 27, 2004 10:38 am

Run Program>CMD /c dir C:\*.txt /b /o:d /t:w > C:\Temp\MyDirStatusFile.txt

8)

For optional parameters check dir /? from the commandline.

Cio

File List sorted by date

Post by Cio » Tue Apr 27, 2004 11:36 am

Thank you very much.

I was thinking only in scripts and I forget the old command line and dir.

Thanks again

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Tue Apr 27, 2004 1:00 pm

Set RP_WAIT to 1 first so that the script waits for Run Program to finish executing the command:

Set>RP_WAIT=1
Run Program>CMD /c dir C:\*.txt /b /o:d /t:w > C:\Temp\MyDirStatusFile.txt
MJT Net Support
[email protected]

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts