Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Win XP: Is there a command line to delete only certain filetypes?

  1. #1
    FLAC Nola111's Avatar
    Join Date
    Jan 2007
    Location
    New Orleans, LA
    Posts
    1,197

    Win XP: Is there a command line to delete only certain filetypes?

    I have approx. 12,000 music files on my harddrive, and half of them are mp3's and half of them are wav's. I want to delete all of the wav's and none of the mp3's. All of my music is arranged in Music\Artist\Album\Songfiles format. Is there a command line to delete ONLY the wav's without having to go into each individual folder?

    For example, if I wanted to go in and unhide all my folder.jpg files in my music directory, I can browse to the root folder in DOS, and type the following:

    'attrib -s -h -r *.jpg /s'

    and it will go in through all of my folders and unhide everything with a ,jpg extension.

    Does a simple line like this for deleting only certain filetypes exist?

    Thanks

  2. #2
    FLAC Nola111's Avatar
    Join Date
    Jan 2007
    Location
    New Orleans, LA
    Posts
    1,197
    You know, I suppose one workaround is to do a search for .wav files in my music folder, and delete all the results. If worse comes to worst I'll do that. Still curious if there's a command line though.

  3. #3
    Raw Wave tj!2k4's Avatar
    Join Date
    Oct 2004
    Posts
    3,294
    I'm sure someone can come up with a better way to do this, but the way I would go about it, is with nested "for" statements

    e.g.:
    Code:
    for /d %i in (*) do for /d %j in (*) do dir "%i\%j\*.wav"
    This would be run from within the Music directory. %i would be Artist directory %j would be album directory. Replace the "dir" with "del" and I think this should work for you.

  4. #4
    Neither darque nor pervert DarquePervert's Avatar
    Join Date
    Apr 2004
    Location
    Elsewhere
    Posts
    13,958
    From the root folder (\MUSIC in your case, Nola):
    DEL /S *.WAV

    Simple as that.
    FYI - From a command line, you an type DEL /? to get all the command line options.
    Have you looked in the FAQ yet?
    How about the Wiki?



    Under normal circumstances, a signature would go here.

  5. #5
    FLAC Nola111's Avatar
    Join Date
    Jan 2007
    Location
    New Orleans, LA
    Posts
    1,197
    Thanks DP, I knew there had to be an easy one.

  6. #6
    Newbie
    Join Date
    Mar 2008
    Posts
    48
    I was about to say use a wild card.

  7. #7
    FLAC Dougw133's Avatar
    Join Date
    Nov 2007
    Location
    PA
    Posts
    1,245
    I have a similar request but more pain staking. I recently lost my collection in the car due to some weather. The last time I backed it up was in May, and it is a mess. Windows media pretty much corrupted it with several un needed jpegs. There is about 3 Jpegs (album art) per Album and my original one named FOLDER. Can I delete all Jpegs with the exception of the one named "Folder"?

  8. #8
    Newbie
    Join Date
    Mar 2008
    Posts
    48
    Quote Originally Posted by Dougw133 View Post
    I have a similar request but more pain staking. I recently lost my collection in the car due to some weather. The last time I backed it up was in May, and it is a mess. Windows media pretty much corrupted it with several un needed jpegs. There is about 3 Jpegs (album art) per Album and my original one named FOLDER. Can I delete all Jpegs with the exception of the one named "Folder"?
    follow the instructions above but use DEL /S *.JPG

  9. #9

  10. #10
    One Sharp Cheddar ThunderStick's Avatar
    Join Date
    Aug 2006
    Location
    West Allis, WI
    Posts
    1,658
    How about this,

    del /s X.jpg
    del /s Y.jpg

    Replace X and Y with the file name you want to remove...
    New Age Garmin - Skin for RR
    New Age Slider - RR SKin In Progress
    "It's called CODE because I don't want you to know"

Page 1 of 2 12 LastLast

Similar Threads

  1. Win XP Embedded - good information
    By mrbean_phillip in forum Software & Software Development
    Replies: 2
    Last Post: 10-11-2007, 05:56 AM
  2. NLITED XP PRO SP2 and PhoneControl. What NOT to delete?
    By LLR in forum Operating System Optimization
    Replies: 4
    Last Post: 12-27-2005, 07:26 AM
  3. Replies: 4
    Last Post: 10-10-2005, 01:56 PM
  4. problems with win xp
    By Moneyfink in forum WinNT Based
    Replies: 2
    Last Post: 03-14-2005, 04:49 PM
  5. Elotouch touchscreen with Win XP
    By TwinII in forum General Hardware Discussion
    Replies: 0
    Last Post: 02-21-2002, 01:38 PM

Bookmarks

Posting Permissions

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