Kill a directory in DOS - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3) +---- Forum: Help Me! (https://qb64phoenix.com/forum/forumdisplay.php?fid=10) +---- Thread: Kill a directory in DOS (/showthread.php?tid=2211) |
Kill a directory in DOS - eoredson - 11-30-2023 Hi, I have recently been able to Kill Filename$ but I would like a function to Kill Directory$ I know in Command.com and Cmd.exe the DEL command has /S to delete all subdirectories but Dosbox-X does not.. Or could a batch file do it?? Erik. RE: Kill a directory in DOS - TerryRitchie - 11-30-2023 (11-30-2023, 04:16 AM)eoredson Wrote: Hi,Use the RMDIR command https://qb64phoenix.com/qb64wiki/index.php/RMDIR RE: Kill a directory in DOS - eoredson - 11-30-2023 (11-30-2023, 04:26 AM)TerryRitchie Wrote:Nope. That only deletes an empty directory!?(11-30-2023, 04:16 AM)eoredson Wrote: Hi,Use the RMDIR command RE: Kill a directory in DOS - TerryRitchie - 11-30-2023 (11-30-2023, 04:35 AM)eoredson Wrote:You can use the RD command at the command prompt with the /S switch but be very careful. Here is a link in the tutorial covering the command prompt commands RD and RMDIR.(11-30-2023, 04:26 AM)TerryRitchie Wrote:Nope. That only deletes an empty directory!?(11-30-2023, 04:16 AM)eoredson Wrote: Hi,Use the RMDIR command https://www.qb64tutorial.com/lessoncli#h.qrrgmgz1s3g1 RE: Kill a directory in DOS - eoredson - 11-30-2023 (11-30-2023, 04:38 AM)TerryRitchie Wrote:(11-30-2023, 04:35 AM)eoredson Wrote:You can use the RD command at the command prompt with the /S switch but be very careful. Here is a link in the tutorial covering the command prompt commands RD and RMDIR.(11-30-2023, 04:26 AM)TerryRitchie Wrote: Use the RMDIR commandNope. That only deletes an empty directory!? As I already stated: Dosbox-X Rd does not have a /S switch. RE: Kill a directory in DOS - TerryRitchie - 11-30-2023 Ok, I'm confused. You're running QB64 programs in Dosbox? RE: Kill a directory in DOS - eoredson - 11-30-2023 I am running QB64 yes. I am trying to be backward compatible to qb11, qb45, and qb71. RE: Kill a directory in DOS - SMcNeill - 11-30-2023 (11-30-2023, 04:50 AM)eoredson Wrote: I am running QB64 yes. https://qb64phoenix.com/qb64wiki/index.php/RMDIR RE: Kill a directory in DOS - eoredson - 11-30-2023 (11-30-2023, 04:53 AM)SMcNeill Wrote:So, I should shell to RMDIR?(11-30-2023, 04:50 AM)eoredson Wrote: I am running QB64 yes. RE: Kill a directory in DOS - SMcNeill - 11-30-2023 As for doing it in a DosBox-X specific way, you should really read their documentation and learn the old commands which they emulate. https://github.com/joncampbell123/dosbox-x/wiki/DOSBox%E2%80%90X%E2%80%99s-Supported-Commands Specifically scroll down and look at the DELTREE command: Quote:DELTREE (external command) |