How to get files older than 15 days

August 3, 2009 at 04:43:48
Specs: Windows Server 2003
Hi All,

I am writing a batch script to zip the files which are older than 15 days. I can loop through the files inside a folderm but I am not sure how to get the date propertie of the file and check with the current date


See More: How to get files older than 15 days

Report •

August 4, 2009 at 02:15:06
What is your date format?

Do you have permissions to download/install a utility?

Report •

August 4, 2009 at 02:19:18
I do not have permission to download a utility. The date format is 8/5/2009 10:38 AM.

Also, if I am using powershell script can this be more easy ?


Report •

August 4, 2009 at 15:18:30
Hi yeshwanth

I dont know anything about poershell,but it can be done in normal batch script. It's a little more complex to do it dedends on your dir listing and date format

Type the commands below and post their output here.
It do'es not need to be a fulldir listing and state wether your date format is mm/dd/yyyy or another format.

echo %Date%

Report •

Related Solutions

Ask Question