Petri IT Knowledgebase Forums
 

Petri.co.il forums Home Forums Start Page Forums Frequently Asked Questions FAQ Member List Members List
Go Back   Petri IT Knowledgebase Forums > Windows Scripting > General Scripting
Petri.co.il is happy to award auglan the title of Most Valuable Member !!!
Register Calendar Calendar Search Petri IT Knowledgebase Forums Search Todays Posts Today's Posts Mark Forums Read

Notices

Batch file to remove directories older than x

Batch file to remove directories older than x

this thread has 3 replies and has been viewed 1173 times

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 16th March 2012, 23:21
200mg 200mg is offline
Casual
Casual
 
 Join Date: Feb 2012
  6 month star 12 month star
 Posts: 11
 Reputation: 200mg is on a distinguished road (10)
Default Batch file to remove directories older than x

Does anyone have a good script out there to remove directories older than x.

I am trying to use unixutils find command but I cannot get it to work

Code:
find "\var\log\syslog\archive"  -type d -mtime +2 -exec rm -rf {} \;
Can anyone suggest another way to remove directories older than x, or tell me whats wrong with that find command?
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help: input data to a string/remove the string leaving only the data using batch file Slow DOS Command Shell 1 23rd September 2011 14:55
Batch file to remove a user from all groups mhashemi DOS Command Shell 3 19th May 2010 05:31
Batch to log Username, Time and Ip-address at login [was: Batch file help] tssizemore82 General Scripting 2 11th August 2009 01:44
batch animation (was:Batch file problem thing) iamgod General Scripting 3 1st June 2009 18:37
Creating batch file to remove lines from PRN file Credo General Scripting 1 14th April 2009 07:44


All times are GMT +3. The time now is 06:45.

Steel Blue 3.5.4 vBulletin Style ©2006 vBEnhanced
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
 

Valid XHTML 1.0!   Valid CSS!

Copyright 2005 Daniel Petri