I want to delete a folder with all files and subfolders using a bat file.
I have tried the following, but it is not working:
@DEL D:\PHP_Projects\testproject\Release\testfolder*.* How can I fix it?
I want to delete a folder with all files and subfolders using a bat file.
I have tried the following, but it is not working:
@DEL D:\PHP_Projects\testproject\Release\testfolder*.* How can I fix it?
Use:
@RD /S /Q "D:\PHP_Projects\testproject\Release\testfolder" Removes (deletes) a directory.
RMDIR [/S] [/Q] [drive:]path RD [/S] [/Q] [drive:]path /S Removes all directories and files in the specified directory in addition to the directory itself. Used to remove a directory tree. /Q Quiet mode, do not ask if ok to remove a directory tree with /S
DEL command with it included.del /s /q c:\where ever the file is\*rmdir /s /q c:\where ever the file is\mkdir c:\where ever the file is\* in for : for /d %G in ("D:\testfolder\*") do rd /s /q "%~G"