October 23, 200322 yr I am trying to delete individual folders using a .cmd file I am currently working on. My problem is that I cant delete entire folders. when I use the following code to delete a folder it only deltes the contians found within:DEL C:\WINDOWS\AppPatchECHO.EXIT1. How can I delete entire folders and there contents?2. How can I delete certian extentions found in a folder or a drive .bmp and so on?
October 23, 200322 yr This kills ur selected file extension, in this case bmp's in the folder(s)DEL C:\folder\*.bmpECHO.EXITThis kills everything in the folder(s)DEL C:\folder\*.*ECHO.EXITand i feeling codie, heres one for visual basic as well This kills everything in the folder(s)Kill "c:\folder\*.*"This kills ur selected file extension, in this case bmp's in the folder(s)Kill "c:\folder\*.bmp"hope i could help you my friend
October 23, 200322 yr to delete a directory, first you need to delete the contents:DEL C:\Deleteme\*.*Then, use the Remove Directory commandRD C:\Deleteme
October 23, 200322 yr Author thx everyone for your help. I am however still having some trouble my code now looks like this: ECHORD /S /Q C:\Documents and Settings\All Users\Start Menu\Programs\Accessories\AccessibilityECHO.EXITWhats wrong with my code it doesnt seem to want to run the cmd box closes before I can see an error. I could also use some links to any pdf's that I might use to learn more about this subject.
October 30, 200322 yr If you have spaces in the path, you have to surround it with quotes:ECHORD /S /Q "C:\Documents and Settings\All Users\Start Menu\Programs\Accessories\Accessibility"ECHO.EXIT
Create an account or sign in to comment