Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


Raile

46 posts

Geek


#37643 16-Jul-2009 09:18
Send private message

Hi everyone,

Im trying to delete a whole bunch of files (about 100,000 files, 700GB). Im cleaning up after data recovery. The files i want to delete are spread through a reasonally deep folder structure. Every file that i want to delete has [1] on the end of it.

I can get the right search terms to find them all (although it seems to find _1_ aswell for some reason). The problem is when i try to select them and delete them. Windows cant seem to handle this. It spends ages working away once i select the files. Once its done i press shift delete (These are not going to fit in the recycle bin). Windows works away for up to 6 or 7 hours. And nothing ends up happening. No comfirm delete dialouge box or anything. All the files are still there.

Iv tried to do this a bunch of different ways to no avail. Iv tried deleting in smaller groups (5000), same problem. I bought a 3rd party tool (duplcate file finder) which i hoped wouldnt suffer from this problem. It does.

Does anyone know a way i can get rid of these files?

Thanks

Create new topic
phlegmboy
59 posts

Master Geek

Trusted

  #235994 16-Jul-2009 09:52
Send private message

The best way to do it would be through the dos prompt.

Just click on Start, Run then type cmd and click on OK.
Change to the drive you are deleting the files from by typing the drive letter then following it with a :, e.g. d:
Go to the top of the folder tree the files are by using the cd command
Then type in the following:
del *[1].* /s

The /s tells the delete command to delete in all subdirectories.

And yes, I tested it on my computer before I typed this :)




I'd go on a Vegan diet but the delivery time from Vega is too long.



freitasm
BDFL - Memuneh
80646 posts

Uber Geek
+1 received by user: 41025

Administrator
ID Verified
Trusted
Geekzone
Lifetime subscriber

  #235995 16-Jul-2009 09:59
Send private message

What about something like this in a batch file (replacing *.bak with something the suits you of course):


FOR /F "tokens=*" %%G IN ('DIR /B /S *.bak') DO DIR "%%G"
REM FOR /F "tokens=*" %%G IN ('DIR /B /S *.bak') DO DEL "%%G"
pause

Test before and if happy with the FOR statement in the first line, repeat on the second line without the REM.





Referral links: Quic Broadband (free setup code: R587125ERQ6VE) | Samsung | AliExpress | Wise | Sharesies 

 

Support Geekzone by subscribing (browse ads-free), or making a one-off or recurring donation through PressPatron.

 


d3Xt3r
697 posts

Ultimate Geek
+1 received by user: 132

Trusted

  #236015 16-Jul-2009 10:56
Send private message

I think it would be faster to simply backup the data you want on that drive, and then format it.



Raile

46 posts

Geek


  #236025 16-Jul-2009 11:07
Send private message

phlegmboy: The best way to do it would be through the dos prompt.



Just click on Start, Run then type cmd and click on OK.

Change to the drive you are deleting the files from by typing the drive letter then following it with a :, e.g. d:

Go to the top of the folder tree the files are by using the cd command

Then type in the following:

del *[1].* /s



The /s tells the delete command to delete in all subdirectories.



And yes, I tested it on my computer before I typed this :)


I tried this on a few subfolders, works great! I thought there might be dos commands for this, but didnt know how to do multiple files at once. Great! its ripping through them.

Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.