Topic: Delete sub folder that older than 7 days (1 of 2), Read 16 times
Conf: Startup, File Open, Exit
From: Abdallah Elassaad
Date: Friday, August 20, 2004 07:03 PM

I have a folder that constantly getting new subfolders (batch process) added. These subfolders get created with today's date i.e. 040820, 040821, etc. I would like to keep the last 7 days of subfolders and delete the rest. Is there any way I can do this really quick in Vedit.

Thanks

Abdallah

 


Topic: Delete sub folder that older than 7 days (2 of 2), Read 17 times
Conf: Startup, File Open, Exit
From: Ian Binnie
Date: Friday, August 20, 2004 10:02 PM

On 8/20/2004 7:03:00 PM, Abdallah Elassaad wrote:
>I have a folder that
>constantly getting new
>subfolders (batch process)
>added. These subfolders get
>created with today's date i.e.
>040820, 040821, etc. I would
>like to keep the last 7 days
>of subfolders and delete the
>rest. Is there any way I can
>do this really quick in Vedit.
>
>Thanks
>
>Abdallah

I am sure this could be done, with the Vedit dir and dir_date commands, but it would be much easier to use a file manager (I use ZTreeWin).

Even easier would be to create a Windows command script using:-
for /D {%% | %}variable in (set) do command [CommandLineOptions]

%~tI Expands %I to the date and time of file

check the Windows help "for"