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
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"
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!
Summary: This is an example of a batch file I am using right now. I need it to delete subfolders in the folders. It already deletes everything else, just not folders. I am not sure what extra code lines I n...
Summary: Hi, I am new to batch scripting and need some help from all your genius' out there. I want to write a script that will delete files older than 14 days from a public server at work. I want to leave any...
Summary: Hello, I’m trying to make a bat file that will delete all files in the My Pictures and the My Music folders for a particular user. This should work for both WinXP and Win2000Pro machines. See, we h...