+ Post New Thread
Results 1 to 5 of 5
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 ...
  1. #1

    Join Date
    Feb 2011
    Posts
    60
    Thank Post
    3
    Thanked 1 Time in 1 Post
    Rep Power
    0

    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.

  2. #2


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    339
    find / -type f -iname "*.jpg" -mtime -7 | xargs /bin/rm -f
    removes jpgs older than 7 days

  3. #3

    Join Date
    Feb 2011
    Posts
    60
    Thank Post
    3
    Thanked 1 Time in 1 Post
    Rep Power
    0
    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 09:28 AM.

  4. #4


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    339
    just add +365 I think.
    you can run unix scripts on windows using cygwin

  5. #5
    Flakes's Avatar
    Join Date
    Nov 2009
    Location
    Newcastle
    Posts
    476
    Thank Post
    38
    Thanked 74 Times in 48 Posts
    Rep Power
    27
    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

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 13
    Last Post: 22nd April 2011, 03:50 PM
  2. InstantMask [Remove background from pictures]
    By DaveP in forum Downloads
    Replies: 6
    Last Post: 7th December 2009, 02:15 PM
  3. Replies: 1
    Last Post: 25th January 2008, 10:53 AM
  4. Replies: 0
    Last Post: 20th August 2007, 02:20 PM
  5. ...remove shortcut to Sample Pictures
    By markesmith in forum How do you do....it?
    Replies: 7
    Last Post: 3rd July 2006, 09:01 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •