Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Batch Script

Status
Not open for further replies.

mannion

IS-IT--Management
Jun 24, 2002
73
GB
Hi

I've never needed to make one in xp till now. The problem I've got is deltree doesn't exsist. How Do I get del *.* /q to also delete folders and subfolders????? any ideas????

Cheers

James Mannion
 
yep...

put this in a batch file eg treekill.bat
Code:
@echo off
echo y | del %1\*.*
rmdir %1
cls

then you call your batch file on each subdirectory...
eg
call c:\batch\treekill \test\bmp
call c:\batch\treekill \test\pag
call c:\batch\treekill \test
call c:\batch\treekill \bmp

can be useful... if u have a LOT of subdirectories, may be a way of getting it to obtain the name of each then remove it in a script.




Aftertaf

"Resolve is never stronger than the night before it was never weaker
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top