A Digital Age Deserves A Digital Leader

Batch file help

Batch file help

Postby Sisco22 » Wed Apr 18, 2012 2:54 pm

Hey guys,

I am needing help with writing a batch file that can delete files from creation date. Basically we have a file share that has a ton of data on it and want to delete files older than 30 days from the creation date. Is anyone good with batch files?

PRO Level 14
User avatar
Posts: 964
Joined: Mon Mar 29, 2004 9:25 pm
Location: Nashville, TN
Real Name: Adam Lowe

Re: Batch file help

Postby ar1stotle » Mon May 07, 2012 12:01 pm

I'm trying to finish my thesis. Normally I'd try to figure this out myself and make sure it works, but because I'm short on time, here's a link that looks like it should help you out.

http://stackoverflow.com/questions/5105 ... han-n-days

With some more googling, you can probably find how to compare numbers against the creation date. Batch file scripting is so unintuitive sometimes. It might be beneficial to install Python on the machine and use that instead haha
User avatar
Posts: 3841
Joined: Sun May 16, 2004 1:59 am
Location: New Orleans, Louisiana

Return to HTML, CSS, and Scripts

Who is online

Users browsing this forum: No registered users and 3 guests