Huamin Posted November 18, 2005 Report Share Posted November 18, 2005 Hi,Is there a command for doing this directly, in the prompt?Thks & Rgds,HuaMin Quote Link to comment Share on other sites More sharing options...
andsome Posted November 18, 2005 Report Share Posted November 18, 2005 Have I understood the question correctly? If I want to remove a whole folder, I open Windows Explorer, right click on the folder, in the left hand column, and select delete. Quote Link to comment Share on other sites More sharing options...
ɹəuəllıʍ ʇɐb Posted November 19, 2005 Report Share Posted November 19, 2005 No, what he means is with the Del or Erase DOS command, from command prompt, or in a script.I am not too familiar with DOS commands, but HELP DEL does not seem to have an option to delete an entire non-empty folder. But maybe someone knows some trick...? Quote Link to comment Share on other sites More sharing options...
andsome Posted November 19, 2005 Report Share Posted November 19, 2005 What is wrong with the straightforward way that I use? Quote Link to comment Share on other sites More sharing options...
ɹəuəllıʍ ʇɐb Posted November 19, 2005 Report Share Posted November 19, 2005 I do not know what Huamin is trying to achieve; maybe in a batch script? Where he doesn't know how deep the folders are nested? Quote Link to comment Share on other sites More sharing options...
andsome Posted November 19, 2005 Report Share Posted November 19, 2005 I do not know what Huamin is trying to achieve; maybe in a batch script? Where he doesn't know how deep the folders are nested?Oh! Quote Link to comment Share on other sites More sharing options...
r4may Posted November 19, 2005 Report Share Posted November 19, 2005 I believe the 'RD /s [drive:path]' command will remove a directory and files, I am not sure about the sub directoriesedit to add directory path to cmd Quote Link to comment Share on other sites More sharing options...
ɹəuəllıʍ ʇɐb Posted November 20, 2005 Report Share Posted November 20, 2005 You are right; that's the command. And it removes subfolders too. HELP RD says for the /S program switchRemoves all directories and files in the specified directory in addition to the directory itself. Used to remove a directory tree. Quote Link to comment Share on other sites More sharing options...
scuzzman Posted November 21, 2005 Report Share Posted November 21, 2005 deltreeWill work as well - be careful when recursively deleting directories though. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.