HI
With the command prompt of Windows 7 SP1, how do I delete a directory structure with their files without deleting the name of the root directory?
THANKS
BYE
Deleting a directory structure
Moderator: DosItHelp
Re: Deleting a directory structure
Untested: syntax is: delfolder.bat "c:\test folder"
Code: Select all
@echo off
pushd "%~1"&&(rd "%~1" /s /q 2>nul&popd)
Re: Deleting a directory structure
foxidrive wrote:Untested: syntax is: delfolder.bat "c:\test folder"Code: Select all
@echo off
pushd "%~1"&&(rd "%~1" /s /q 2>nul&popd)
Ok.
THANKS
BYE