• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 330
  • Last Modified:

Delete files using DOS

I have a folder that takes forever to render. I need to start deleting files before the drive fills up. I was hoping to use DOS to accomplish this. Is there a way to display files on the command window and filtering them out by created date? Thanks!
0
horalia
Asked:
horalia
1 Solution
 
knightEknightCommented:
What kind of filter?

You can filter by specific date like this:

  dir  *.*  | find "05/10/2011"

or by specific month:

  dir  *.*  |  findstr  "05/../2011"

0
 
knightEknightCommented:
But first, you would of course need to navigate to the folder where your files are stored.  In the command prompt do this:

  CD/D  "C:\My Folder\My Sub Folder"

replace  C:  with the drive letter and  My Folder  with the actual path.
0
 
QlemoC++ DeveloperCommented:
You can't filter for date by default. However, you can at least sort by date:
   dir /o:-d /t:c /p
/t:c will use and disply creation date (vs. modification date), and /o:-d will sort descending after date. /p will pause after each page.
If you want ascending sort for date, use /o:d instead.
0
Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

 
n2fcCommented:
1) Open a command prompt
2) CD to directory in question
3) Use:    dir /od   to sort directory by date
4) Use:    dir /od /tc as above, but use CREATION date
0
 
QlemoC++ DeveloperCommented:
I said this because "filter for date" usually means something like "the last 5 days".
0
 
knightEknightCommented:
If you need to DELETE based on date, there is no direct way, but a solution can certainly be scripted out.  Just let us know what it is you need done.  Please provide more details like the filename format, the exact path, the number of files, how many to delete, and based on what criteria, etc.
0
 
horaliaAuthor Commented:
What I'm ending up doing, is moving them to another folder, then emptying that folder.... Of course, this is a very cumbersome process. There are over 750,000 on the folder, file names have no rhyme or reason, so I would like to delete the oldest ones. I have a bunch that were created on 11/18/2011. Path is E:\Image. Thanks!
0
 
Bill PrewCommented:
If you don't mind using a small free command line utility, take a look at DELAGE32:

http://home.mnet-online.de/horst.muc/win/delage.htm
http://home.mnet-online.de/horst.muc/wbat32.htm

~bp
0
 
Lionel MMSmall Business IT ConsultantCommented:
So do you want something that will look at the creation date, such as 11/18/2011 and then delete it or do you want to have something that determines what the oldest creation daea is and then delete all the files created on that date?
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now