This forum is in permanent archive mode. Our new active community can be found here.

Delete lots of stuff in Vista

edited May 2008 in Technology
Several months ago, when I got my Vista PC, I used the automated system for moving all my files over. there was a problem half-way through and I had to run it again.

Now I have about 20GB of duplicate files that all look like filename (1).extension. I want to delete all of these files but when I try to do a search for (1) I get every damn file with a "1" showing up. I even tried searching for "(1).gif" and ended up with a list of files that did not contain the (1) marker. Anyone?

Comments

  • edited May 2008
    Open a command line (type CMD in the start search) and CD to your c:\users\%yourusername%\ directory. Type in this command:
    del /f /s /q *(1).*
    This will delete every file in every subdirectory which conforms to this format: filename(1).extension

    Warning:This will delete files without asking for conformation, even if they are read only. For a more hands on approach through file by file confirmation, type in this command:
    del /f /s *(1).*
    Happy Hunting!
    Post edited by Victor Frost on
  • The problem there is that I have to go directory by directory to find all of the files! Why does Windows Search not allow me to search just for filenames that contain "(1)" in them?
  • The command Sonic gave you will delete all the *(1)* files in all directories, recursively, if you run it from the root directory of each drive, e.g., C:\> del /f /s /q *(1).*

    As for Windows search, unless they've changed it since XP (I haven't really spent much time with Vista), just put "*(1)* into the search box, and it should find everything.
  • Now I have about 20GB of duplicate files that all look like filename(1).extension. I want to delete all of these files
    This will delete every file in every subdirectory which conforms to this format: filename(1).extension
    The problem there is that I have to go directory by directory to find all of the files!
    :HEADDESK: :HEADDESK: :HEADDESK: :HEADDESK: :HEADDESK:

    Steve, you don't have to use Windows Search if you would just follow Sonic's instructions. You wish to find those duplicate files, right? And then remove them, right? I'll let you in on a secret. The del command Sonic gave will search for the files itself and delete them as it finds them. No need for you to do anything! You can continue browsing the internet while your computer deletes those duplicate files for you! How wonderful is that?
  • The reason I do not trust the delete command listed above is that when I use the Windows Search box and use "*(1)*" every file with a "1" in the filename shows up. If delete uses the same function as search to sort through files that command will delete all my files with a "1" in the filename.
  • Sonic suggested an approach that prompts you before every deletion. That will allow you to at least test it.
    Alternatively, make a seperate folder and test the command only within that, to see if it will delete stuff with 1s.
  • Is "(" or ")" ignored as a special character by windows?
  • The reason I do not trust the delete command listed above is that when I use the Windows Search box and use "*(1)*" every file with a "1" in the filename shows up. If delete uses the same function as search to sort through files that command will delete all my files with a "1" in the filename.
    Read the entire post!
    For a more hands on approach through file by file confirmation, type in this command:del /f /s *(1).*
  • edited May 2008
    I checked; it works fine in the command line to do what Sonic said.
    It deleted (1).txt but not 1.txt

    However, Sonic wasn't entirely right; removing \q doesn't necessarily make it prompt on each file.
    You need to add \p to ensure this.
    Post edited by lackofcheese on
  • Hmmmmm.... This is a tough one, perhaps the problem is.......

    That it's VISTA!

    sorry, I had to.
  • Hmmmmm.... This is a tough one, perhaps the problem is.......

    That it's VISTA!

    sorry, I had to.
    More likely it's PEBKAC than VISTA.
  • edited May 2008
    I checked; it works fine in the command line to do what Sonic said.
    It deleted (1).txt but not 1.txt

    However, Sonic wasn't entirely right; removing \q doesn't necessarily make it prompt on each file.
    You need to add \p to ensure this.
    Yup, thats right. Under most circumstances it will prompt you but to be extra sure you should add the "/p" function.
    :HEADDESK: :HEADDESK: :HEADDESK: :HEADDESK: :HEADDESK:

    Steve, you don't have to use Windows Search if you would just follow Sonic's instructions. You wish to find those duplicate files, right? And then remove them, right? I'll let you in on a secret. The del command Sonic gave will search for the files itself and delete them as it finds them. No need for you to do anything! You can continue browsing the internet while your computer deletes those duplicate files for you! How wonderful is that?
    I've never been so violently defended. *sniff* I am honored.
    Post edited by Victor Frost on
Sign In or Register to comment.