473,508 Members | 2,805 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multiple File Delete

115 New Member
Hi all,

I am frustrated with windows when trying to delete large amounts of temp files. Ill select all then press delete, but when it gets to one file that may be open it rightfully errors. I seem to recall a way to have it continue on deleting after encountering the error instead of just stopping (either tool or setting..) but i just cant remember.

Ive tried the command prompt "del *.*" but it doesnt hit sub directories or hidden files.

Any pointers?

Thanks,
Apr 18 '08 #1
8 2927
Stang02GT
1,208 Recognized Expert Top Contributor
Hi all,

but when it gets to one file that may be open it rightfully errors.

Thanks,

If you are trying to delete files that are open it won't delete and you will continue to get errors. make sure everything is closed before you delete things.



And im not sure if there is a way you can turn those errors off, but i don't think you can
Apr 18 '08 #2
ShadowLocke
115 New Member
If you are trying to delete files that are open it won't delete and you will continue to get errors. make sure everything is closed before you delete things.



And im not sure if there is a way you can turn those errors off, but i don't think you can

Nah..theres defenitly something..although..im starting to think i may have just wrote a script that did it for me...
Apr 18 '08 #3
jg007
283 Contributor
Nah..theres defenitly something..although..im starting to think i may have just wrote a script that did it for me...
misread the question and could find how to delete the sill reply :)
Apr 19 '08 #4
ShadowLocke
115 New Member
Came accross this again, found a solution through dos
http://www.ss64.com/nt/del.html

del *.* /q /f /a:H /a:S /a:A
rd <dir> /s

or better

:: Remove all files and subfolders but NOT the root folder
:: From tip 617 at JsiFAQ.com
@echo off
pushd %1
del *.* /q /f /a:H /a:S /a:A
for /f "Tokens=*" %%G in ('dir /B') do rd /s /q "%%G"
popd
May 22 '08 #5
questionit
553 Contributor
Came accross this again, found a solution through dos
http://www.ss64.com/nt/del.html

del *.* /q /f /a:H /a:S /a:A
rd <dir> /s

or better

:: Remove all files and subfolders but NOT the root folder
:: From tip 617 at JsiFAQ.com
@echo off
pushd %1
del *.* /q /f /a:H /a:S /a:A
for /f "Tokens=*" %%G in ('dir /B') do rd /s /q "%%G"
popd
Are you sure this command will delete folders besides files?

Why not use Windows Disk cleaner, which can delete temporary files as well- without needing to delete them manually.

Qi
May 23 '08 #6
AmberJain
884 Recognized Expert Contributor
Came accross this again, found a solution through dos
http://www.ss64.com/nt/del.html

del *.* /q /f /a:H /a:S /a:A
rd <dir> /s

or better

:: Remove all files and subfolders but NOT the root folder
:: From tip 617 at JsiFAQ.com
@echo off
pushd %1
del *.* /q /f /a:H /a:S /a:A
for /f "Tokens=*" %%G in ('dir /B') do rd /s /q "%%G"
popd
This method is not preferred due to certain reasons---->

1. This is too cumbersome or "not user friendly" as it uses DOS commands which are not suitable for a normal minimal XP user (although if you are a dos lover like me, then you can certainly follow this step)

2. This still does not solves the problem which you mentioned earlier---->
I am frustrated with windows when trying to delete large amounts of temp files. Ill select all then press delete, but when it gets to one file that may be open it rightfully errors.
i.e. if the file is used by another process, even DOS's delete command ["del *.* /q /f /a:H /a:S /a:A" as you suggested] cannot delete the file.

3. I agree with Questionit on his following reply -------------->
Are you sure this command will delete folders besides files?
Why not use Windows Disk cleaner, which can delete temporary files as well- without needing to delete them manually.
Good work questionit.......I expected this from you. But I think even Windows Disk cleaner will not be able to delete files which are in use by other processes.
|||||||||||||||||||||||||||||||||||||||||||||||||| |||||||||||||||||||||||||||||||||||||||||||||||||| |||||||||||||||||||||||||||||||||||||||||||||||||| |||

So is there any solution to this problem?
YES, there's certainly a solution..............

There are many of utilities online which help you perform the desired task PLUS overcome all the problems mentioned above.

Click on the link below to goto the page of a very fine utility called "UNLOCKER".
LINK

On that page you will find names of various other similar (and useful) utilities under the heading - "Similar programs and why Unlocker is better".

Now, simply download "UNLOCKER" and then install it. Then simply open the folder in which you want to delete large amounts of temporary (or any other kind) files. Press [CTRL+a] to select all the files and folders .Then right click any selected folder and select "Unlocker" option. In unlocker's window, if any locking handles for any of selected files/folders are found, then click on [UNLOCK] option and select "delete" option on the left bottom corner.

This will do your job.

__________________________________________________ ________________
NOTE ---- This utility can be useful when dealing with "deletion of viruses" as some of the virus are simply not deletable. You can virtually delete any virus using this tool.
__________________________________________________ ________________
HOPE THIS HELPS...............

==============
=AmbrNewlearner=
==============
May 23 '08 #7
questionit
553 Contributor
This method is not preferred due to certain reasons---->



1. This is too cumbersome or "not user friendly" as it uses DOS commands which are not suitable for a normal minimal XP user (although if you are a dos lover like me, then you can certainly follow this step)

2. This still does not solves the problem which you mentioned earlier---->

i.e. if the file is used by another process, even DOS's delete command ["del *.* /q /f /a:H /a:S /a:A" as you suggested] cannot delete the file.

3. I agree with Questionit on his following reply -------------->

Good work questionit.......I expected this from you. But I think even Windows Disk cleaner will not be able to delete files which are in use by other processes.
|||||||||||||||||||||||||||||||||||||||||||||||||| |||||||||||||||||||||||||||||||||||||||||||||||||| |||||||||||||||||||||||||||||||||||||||||||||||||| |||

So is there any solution to this problem?
YES, there's certainly a solution..............

There are many of utilities online which help you perform the desired task PLUS overcome all the problems mentioned above.

Click on the link below to goto the page of a very fine utility called "UNLOCKER".
LINK

On that page you will find names of various other similar (and useful) utilities under the heading - "Similar programs and why Unlocker is better".

Now, simply download "UNLOCKER" and then install it. Then simply open the folder in which you want to delete large amounts of temporary (or any other kind) files. Press [CTRL+a] to select all the files and folders .Then right click any selected folder and select "Unlocker" option. In unlocker's window, if any locking handles for any of selected files/folders are found, then click on [UNLOCK] option and select "delete" option on the left bottom corner.

This will do your job.

__________________________________________________ ________________
NOTE ---- This utility can be useful when dealing with "deletion of viruses" as some of the virus are simply not deletable. You can virtually delete any virus using this tool.
__________________________________________________ ________________
HOPE THIS HELPS...............

==============
=AmbrNewlearner=
==============
Hi all

--The following is more about ending a process that is currently running (so that you can delete the files you want)

There are atleast 2 methods within Windows you can use to end a process that is currently running.

1- Use Command Prompt's command: taskkill

2- If nothing helps then follow these steps:
- Open Command Prompt
- open Windows Task Manager
- close explorer.exe from task manager
- delete file you want to delete from Command Prompt - it will let you delete now!
- from Windows Task Manager, open explorer.exe

3- One can use VBScript to run the taskkill command or to do similar thing. It will be handy, as you can specify which files to kill/stop and then which ones to delete. This Vb Script can be run by just a double-click

Hope it helps?
Qi
May 23 '08 #8
AmberJain
884 Recognized Expert Contributor
Hi all

--The following is more about ending a process that is currently running (so that you can delete the files you want)

There are atleast 2 methods within Windows you can use to end a process that is currently running.

1- Use Command Prompt's command: taskkill

2- If nothing helps then follow these steps:
- Open Command Prompt
- open Windows Task Manager
- close explorer.exe from task manager
- delete file you want to delete from Command Prompt - it will let you delete now!
- from Windows Task Manager, open explorer.exe

3- One can use VBScript to run the taskkill command or to do similar thing. It will be handy, as you can specify which files to kill/stop and then which ones to delete. This Vb Script can be run by just a double-click

Hope it helps?
Qi
Method 1 works really fine. So no doubts about it.

Method 2 --> If the file is running or is in use by another process, then this method still cannot delete the file directly. I mean to say that we still need to end processes associated with that file by method 1 (which you suggested above) or from task manager. So do you have anything else to say about this method?

Method 3 --> I don't know much about VBScript and so NO COMMENTS about method 3.

__________________________________________________ _______________
HOPE THIS HELPS..........
==============
=AmbrNewlearner=
==============
May 24 '08 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

1
3210
by: Mark Everett | last post by:
Hi, I am currently running out of space on one of my database servers. Is it possible to move the relevant files for tables onto another drive and instuct MySql to use both folders for it's...
6
4961
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing...
5
2218
by: vj | last post by:
Hi all, I am using C++Builder-5. I want to run multiple cpp files at the same time. If I use the C++Builder for running a cpp file (i.e., I just double click the cpp file, it then opens in the...
10
14474
by: Mateusz Rajca | last post by:
Hi! How do I delete multiple files in C#? I would like the specific code. Thanks! Matt
3
3764
by: Tigera | last post by:
Greetings, I too have succumbed to the perhaps foolish urge to write a video game, and I have been struggling with the implementation of multiple dispatch. I read through "More Effective C++"...
16
15502
by: WATYF | last post by:
Hi there... I have a huge text file that needs to be processed. At the moment, I'm loading it into memory in small chunks (x amount of lines) and processing it that way. I'd like the process to be...
2
5322
by: Michael | last post by:
It seems that a gridview allows us to delete only a single row at a time. How to extend this functionality to select multiple rows and delete all of the selected rows in a single stroke? just like...
3
3905
by: nigelesquire | last post by:
Please help! I'm trying to clone and delete multiple rows with JavaScript. I need two delete buttons that work...! I only have one for now, but it's not working properly, the output count is...
8
9831
johngault
by: johngault | last post by:
I've been working with this PHP page for several days now and I'm stumped. The page is supposed to allow the user to upload up to six images for their profile. When the user adds an image it (the...
4
4854
by: MoroccoIT | last post by:
Greetings - I saw somewhat similar code (pls see link below) that does mupltiple files upload. It works fine, but I wanted to populate the database with the same files that are uploaded to...
0
7229
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7129
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7398
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5637
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5057
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4716
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3208
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1566
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
428
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.