Computing.Net > Forums > Programming > Batch DEL help!

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 DEL help!

Reply to Message Icon

Name: Jza
Date: May 14, 2007 at 14:51:33 Pacific
OS: Windows XP, SP2
CPU/Ram: AMD 64bit Athalon, 1GB DD
Product: HP Pavilion a1222n
Comment:

I'm trying to write a batch file capable of deleting a file located in an unknown directory. I want the batch file to be able to delet a file named hello.jpg, without knowing the directory it is in. Is this possible?

Jeff



Sponsored Link
Ads by Google

Response Number 1
Name: jongray
Date: May 14, 2007 at 20:00:30 Pacific
Reply:

C:
cd WINDOWS\FOLDER
del /s hello.jpg

(will delete hello.jpg in all subdirectories from FOLDER, works in win xp that I know of)


0

Response Number 2
Name: bdivineiii
Date: June 2, 2007 at 04:11:40 Pacific
Reply:

I'm sure you've already received an answer but this one is easy so here.

::zap.bat
CD\
FOR %%i IN ('DIR /B /S hello.jpg') DO DEL /S hello.jpg
exit


0

Response Number 3
Name: Mechanix2Go
Date: June 2, 2007 at 04:24:05 Pacific
Reply:

Not much point in changing drives/directories.

just:

del /s c:\some\path\hello.jpg


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

M2



0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Variable not working. stop RealPlayer nags



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 DEL help!

batch del command www.computing.net/answers/programming/batch-del-command/3006.html

Need batch file help www.computing.net/answers/programming/need-batch-file-help/17147.html

batch file help www.computing.net/answers/programming/batch-file-help/13830.html