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.




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
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.

BDFL - Memuneh
63289 posts

Uber Geek
+1 received by user: 13814

Administrator
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.





 
 
 
 


642 posts

Ultimate Geek
+1 received by user: 96

Trusted
Subscriber

  # 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.



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



Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:





News »

Porirua City Council first to adopt new council software solution Datascape
Posted 15-May-2019 12:00


New survey provides insight into schools' technology challenges and plans
Posted 15-May-2019 09:30


Apple Music now available on Alexa devices in Australia and New Zealand
Posted 15-May-2019 09:11


Make a stand against cyberbullying this Pink Shirt Day
Posted 14-May-2019 20:23


Samsung first TV manufacturer to launch the Apple TV App and Airplay 2
Posted 14-May-2019 20:11


Vodafone New Zealand sold
Posted 14-May-2019 07:25


Kordia boosts cloud performance with locally-hosted Microsoft Azure ExpressRoute
Posted 8-May-2019 10:25


Microsoft Azure ExpressRoute in New Zealand opens up faster, more secure internet for Kiwi businesses
Posted 8-May-2019 09:39


Vocus Communications to deliver Microsoft Azure Cloud Solutions through Azure ExpressRoute
Posted 8-May-2019 09:25


Independent NZ feature film #statusPending to premiere during WLG-X
Posted 6-May-2019 22:13


The ultimate dog photoshoot with Nokia 9 PureView #ForgottenDogsofInstagram
Posted 6-May-2019 09:41


Nokia 9 PureView available in New Zealand
Posted 6-May-2019 09:06


Motorola Solutions joins local partners to deliver advanced communications network in New Zealand
Posted 30-Apr-2019 21:50


Micron launches high-performance NVMe SSDs for cloud and enterprise markets
Posted 30-Apr-2019 10:27


Jaguar Land Rover trials in-vehicle smart wallet technology
Posted 29-Apr-2019 21:48



Geekzone Live »

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


Support Geekzone »

Our community of supporters help make Geekzone possible. Click the button below to join them.

Support Geezone on PressPatron



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.

Alternatively, you can receive a daily email with Geekzone updates.