Solved

delete files which older than 2 years

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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Master DC completely died 15 66
How ldap located a Domain controller? 22 70
VMWare 101 9 84
Exchange 2010 certificate warning. 5 24
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
This article is a collection of issues that people face from time to time and possible solutions to those issues. I hope you enjoy reading it.
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.

739 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