Scripts Thread, Remove Pictures script in Coding and Web Development; I am looking to create a script that will run on our file servers to remove any pictures older than ...
30th June 2011, 09:41 AM #1
- Rep Power
Remove Pictures script
I am looking to create a script that will run on our file servers to remove any pictures older than a set modified date.
Any help would be greatly appreciated.
30th June 2011, 09:51 AM #2
removes jpgs older than 7 days
find / -type f -iname "*.jpg" -mtime -7 | xargs /bin/rm -f
30th June 2011, 10:14 AM #3
- Rep Power
Is there a way to change the 'older than' to years instead of days?
Just to add the Servers are 2008 R2
Last edited by rpettit; 30th June 2011 at 10:28 AM.
30th June 2011, 12:31 PM #4
just add +365 I think.
you can run unix scripts on windows using cygwin
30th June 2011, 12:44 PM #5
install robocopy, off the top of my head i dont know the command, however all the commands are here: Robocopy
and theres a thread on edugeek with more info about robocopy
By jonnyfive in forum Scripts
Last Post: 22nd April 2011, 04:50 PM
By DaveP in forum Downloads
Last Post: 7th December 2009, 03:15 PM
By Mr_M_Cox in forum Windows
Last Post: 25th January 2008, 11:53 AM
By baronne in forum Scripts
Last Post: 20th August 2007, 03:20 PM
By markesmith in forum How do you do....it?
Last Post: 3rd July 2006, 10:01 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)