Solved

delete files which older than 2 years

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

708 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

17 Experts available now in Live!

Get 1:1 Help Now