Solved

delete files which older than 2 years

Posted on 2014-07-22
4
223 Views
Last Modified: 2014-07-26
hello Experts
there are so many data on my file server(windows server), it always cause the server out of space, actually all files which older than 2 years is not usable for me, so we can delete or purge them.
so my question is, is there any software could help list such files on my server, so that i can clear it?

thank you
0
Comment
Question by:beardog1113
4 Comments
 
LVL 70

Expert Comment

by:garycase
ID: 40213420
There are a lot of ways to list older files and automatically delete them ... but you need to be careful.   Many system components are likely that old ... and deleting them could cause significant problems.    Ditto components that are part of your applications.

A few scripts that will work for this are shown here (note that the first one does not work -- the responses that follow are the ones that work):  http://stackoverflow.com/questions/324267/batch-file-to-delete-files-older-than-a-specified-date

I'd limit the area you search and delete files from to the user folders, however, to avoid the issue I noted r.e. system and program components.
0
 
LVL 8

Expert Comment

by:Wilder_Admin
ID: 40213461
I am using for that occasion delage32. There you can config which folder to delete. Quite simple and easy to use.
Helps my day as a fileserveradmin.
0
 
LVL 13

Accepted Solution

by:
duncanb7 earned 500 total points
ID: 40213550
You can write a simple batch script to do that with forfiles command and
looping all your directory you want

example forfiles command :
 where 2 is the fiie for older than 2 days
forfiles /p "typeyourpathhere" /s /d -2 /c "cmd /c del @path "

Document for forfiiles:  http://ss64.com/nt/forfiles.html

Duncan
0
 

Author Closing Comment

by:beardog1113
ID: 40222039
thank you
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
No single Antivirus application (despite claims by manufacturers) will catch or protect you from all Virus / Malware or Spyware threats. That doesn't stop you from further protecting yourself however - and this article is to show you how.
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question