Solved

delete files which older than 2 years

Posted on 2014-07-22
4
218 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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

A procedure for exporting installed hotfix details of remote computers using powershell
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

911 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now