Jump to content

Recommended Posts

Posted

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

Posted
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)
Posted
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. :)
Posted
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 :)

Posted
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.

Posted
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 :)
Posted

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

Posted

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).

Posted
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
Posted
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:

 find /sharepath/ -atime +7 -print0 | xargs -0 -I {} mv {} /new/server

where /new/server is a iscsi/smb/nfs share to the actual server

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...