Computing.Net > Forums > Programming > batch to delete folders

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

batch to delete folders

Reply to Message Icon

Name: joker56123
Date: January 23, 2008 at 09:26:02 Pacific
OS: XP
CPU/Ram: 1gb
Product: ITNS
Comment:

Hello. I need to delete a folder called
Full Circle Systems Docvue
from anywhere it can be found on my computer. I have tried this but get an error
dir /s /b "Full Circle Systems Docvue" > "c:\documents and settings\Files.txt"
FOR /F "Tokens=*" %%F IN (Files.txt) DO rmdir /s /q %%F
DEL "c:\documents and settings\Files.txt"

I have also tried %%a

Any ideas?




Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: January 23, 2008 at 09:47:46 Pacific
Reply:

@echo off
setLocal EnableDelayedExpansion

for /f "tokens=* delims= " %%a in ('dir/s/b/ad "c:\Full Circle Systems Docvue"') do (
rd /s /q "%%a"
)



=====================================
If at first you don't succeed, you're about average.

M2



0

Response Number 2
Name: joker56123
Date: January 23, 2008 at 10:00:47 Pacific
Reply:

Thanks for the reply M2. I tried the command and it didnt seem to work. The folder is not located in c:\ but going to be found in Documents and settings\User Profiles\start menu\Programs\
I don't know what the user profile folders are called and hence the dilema.


0

Response Number 3
Name: joker56123
Date: January 23, 2008 at 10:13:52 Pacific
Reply:

I take that back. It worked perfectly. When I tested I copied and pasted it into a dos window but forgot to remove the one of the double % signs. Thanks again!


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: batch to delete folders

Batch file to delete folder in fol. www.computing.net/answers/programming/batch-file-to-delete-folder-in-fol/16994.html

batch file to delete folders/files www.computing.net/answers/programming/batch-file-to-delete-foldersfiles/16164.html

Batch to Delete files in a folder www.computing.net/answers/programming/batch-to-delete-files-in-a-folder/16299.html