Results 1 to 7 of 7

Thread: Deleting files

  1. #1
    Join Date
    Jan 2003

    Deleting files

    We need to delete many files with 1 command in Windows 2000.

    Its old logfiles and they are named like this:
    Thats year 2004 May the 6.

    A DOS command should exist that can delete all files in this range:
    ex040505.log - ex040101.log

    Anyone any ideas?

    Or command that make us able to delete all files older than:

    Thanks, regards

  2. #2
    Use wildcards.

    To delete year 2003: del ex03????.log
    To delete Jan 2004 : del ex0401??.log

    Deletes wholes year you wan to get rid of (2001, 2002, 2003) and the deletes each month of 2004 until you reach the desired month..

    Not really "one command" but still does the job...

  3. #3
    Join Date
    Jan 2003
    Yes, it could do the job and thats the main point but those files are placed in different directories.

    Every website have its own raw log-files placed in their own directory.

    So the command should delete all files that match in all directories on that server with some commands.

    Any ideas how?

  4. #4
    add /S , it recurses subsidrectories

    del C:\Logs\ex04????.log /S

  5. #5
    Join Date
    May 2004
    Mountain View, CA
    the /s is actually new to me as well. Thanks Alex.
    DreamLogic Cult Film and Music Reviews
    STOPware - Visitor Management solutoins

  6. #6
    I'm more than happy to help

  7. #7
    Join Date
    Jan 2003
    alex-info, you are great - it worked - thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts