Solved

delete files which older than 2 years

Posted on 2014-07-22
4
227 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

When asking a question in a forum or creating documentation, screenshots are vital tools that can convey a lot more information and save you and your reader a lot of time
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

717 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