Scripts Thread, Delete your old files or I will in Coding and Web Development; Dear All,
Does anyone have a script that I can point at a named directory and it will delete any ...
-
19th September 2011, 06:56 PM #1 Delete your old files or I will
Dear All,
Does anyone have a script that I can point at a named directory and it will delete any file that has not been accessed since dd/mm/yyyy
All the staff at my school are hoarders and they do insist on keeping every photo, you tube clip and document they have ever produced. I have been threatening to do this for ages but they have not listened so now it's time for action.
Thanks in advance
Ian
-
-
IDG Tech News
-
19th September 2011, 07:21 PM #2 I did it with a simple search all things last edited before 4 years ago (found around 80gb) then moved it all to another server and nobody notices bar 1 person)
-
-
19th September 2011, 07:26 PM #3 I have issued countless warnings and been told "Oh I need those files!
I have dvds goinf back years with stuff I have moved and I have never, ever been asked to resurrect anything.
-
-
19th September 2011, 09:37 PM #4 Allocate 500mb to their account and if / when they fill it they have to get rid of old stuff themselves to save most recent work... alternatively get them to use Live@EDU Skydrive.
-
-
19th September 2011, 09:41 PM #5 
Originally Posted by
DaveMurphy
Allocate 500mb to their account and if / when they fill it they have to get rid of old stuff themselves to save most recent work... alternatively get them to use Live@EDU Skydrive.

not that simple - some of our staff geniunly need say 4/5gb space which is fine by me aslong as 1. its proper work, 2. its not full of itunes collection 3. its not full of videos (we have custom made web based video player for this) they are allowed videos on there which are not more then a week that they have not managed to upload yet.
oh and 4. slt give me funding for my new shiny File Servers next year
-
-
20th September 2011, 08:43 AM #6 
Originally Posted by
glennda
I did it with a simple search all things last edited before 4 years ago (found around 80gb) then moved it all to another server and nobody notices bar 1 person)
I would say this or laserblazers idea. Someone is bound to need that 1 file that no one else in the world has a copy of 6 months down the line.
-
-
20th September 2011, 09:01 AM #7 Every now and again I burn to DVD all the stuff older than 3 years and then delete it off the server. Noone has ever moaned and, like laserblazer, I have a pile of DVDs nobody even knows exist
-
-
20th September 2011, 10:22 PM #8 just my opuion hre wouldnt be better to turn an unused workstation to a server, and then house all the unused files on that clear the duplicates and then map the driveto your main server and then allow all them to have a shortcut to the file and only apply a script to copy it back in when it get accessed and then sorcut agian after few months of not acess
this prob complex but with computer world ever involonmg sure this can be done
-
-
20th September 2011, 10:32 PM #9 Good old Robocopy has a option to move files based on access date.
Robocopy
/MAXAGE:n : MAXimum file AGE - exclude files older than n days/date.
/MINAGE:n : MINimum file AGE - exclude files newer than n days/date.
(If n < 1900 then n = no of days, else n = YYYYMMDD date).
/MAX:n : MAXimum file size - exclude files bigger than n bytes.
/MIN:n : MINimum file size - exclude files smaller than n bytes.
/MAXLAD:n : MAXimum Last Access Date - exclude files unused since n.
/MINLAD:n : MINimum Last Access Date - exclude files used since n.
(If n < 1900 then n = n days, else n = YYYYMMDD date).
-
-
20th September 2011, 10:35 PM #10 one thing about doing it with a search is you can look at file paths - you can the look to see if there is a whole load of data which is stored say in the SLT folder and you don't think it should be moved you can avoid - some with things like pastoral records etc
-
-
20th September 2011, 10:41 PM #11 
Originally Posted by
chrisredfield93
just my opuion hre wouldnt be better to turn an unused workstation to a server, and then house all the unused files on that clear the duplicates and then map the driveto your main server and then allow all them to have a shortcut to the file and only apply a script to copy it back in when it get accessed and then sorcut agian after few months of not acess
this prob complex but with computer world ever involonmg sure this can be done
Actually not a bad idea at all. Assuming you didn't run any regular antivirus or backup on the temporary server (that would distort the access time) You could run a simple weekly script that moves them. using cygwin on windows or any other nix it would be a cron job like:
Code:
find /sharepath/ -atime +7 -print0 | xargs -0 -I {} mv {} /new/server where /new/server is a iscsi/smb/nfs share to the actual server
-
SHARE:
Similar Threads
-
By drjturner in forum General Chat
Replies: 10
Last Post: 9th August 2007, 05:41 PM
-
By pete in forum School ICT Policies
Replies: 8
Last Post: 29th November 2006, 01:43 PM
-
By mrforgetful in forum Jokes/Interweb Things
Replies: 3
Last Post: 27th November 2006, 09:42 PM
-
By speckytecky in forum How do you do....it?
Replies: 1
Last Post: 15th November 2006, 03:21 PM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules