Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Kill a directory in DOS
#14
(11-30-2023, 05:10 AM)SMcNeill Wrote:
Code: (Select All)
Print "Enter dir spec:";
Input Dir$
If _DirExists(Dir$) Then
   RmDir Dir$
End If

If the directory isn't empty, then you'll need to write a routine to change to get the files in that directory, KILL them, and then RMDIR that directory.  If there's directories inside that directory and not just files, then you'll want that routine to work recursively.
Very well stated! That is what I was starting to do..

Could you write one?? It would have to be internal without any shell.

Given the two functions Kill and RMdir it could be done...
Reply


Messages In This Thread
Kill a directory in DOS - by eoredson - 11-30-2023, 04:16 AM
RE: Kill a directory in DOS - by TerryRitchie - 11-30-2023, 04:26 AM
RE: Kill a directory in DOS - by eoredson - 11-30-2023, 04:35 AM
RE: Kill a directory in DOS - by TerryRitchie - 11-30-2023, 04:38 AM
RE: Kill a directory in DOS - by eoredson - 11-30-2023, 04:44 AM
RE: Kill a directory in DOS - by TerryRitchie - 11-30-2023, 04:47 AM
RE: Kill a directory in DOS - by eoredson - 11-30-2023, 04:50 AM
RE: Kill a directory in DOS - by SMcNeill - 11-30-2023, 04:53 AM
RE: Kill a directory in DOS - by eoredson - 11-30-2023, 04:58 AM
RE: Kill a directory in DOS - by SMcNeill - 11-30-2023, 05:01 AM
RE: Kill a directory in DOS - by SMcNeill - 11-30-2023, 04:59 AM
RE: Kill a directory in DOS - by eoredson - 11-30-2023, 05:03 AM
RE: Kill a directory in DOS - by mnrvovrfc - 11-30-2023, 06:58 AM
RE: Kill a directory in DOS - by SMcNeill - 11-30-2023, 05:10 AM
RE: Kill a directory in DOS - by eoredson - 11-30-2023, 05:13 AM
RE: Kill a directory in DOS - by SMcNeill - 11-30-2023, 05:40 AM
RE: Kill a directory in DOS - by TerryRitchie - 11-30-2023, 05:37 AM
RE: Kill a directory in DOS - by eoredson - 11-30-2023, 05:40 AM
RE: Kill a directory in DOS - by TerryRitchie - 11-30-2023, 06:36 AM
RE: Kill a directory in DOS - by eoredson - 11-30-2023, 06:07 AM
RE: Kill a directory in DOS - by SMcNeill - 11-30-2023, 06:30 AM
RE: Kill a directory in DOS - by eoredson - 11-30-2023, 06:44 AM
RE: Kill a directory in DOS - by SMcNeill - 11-30-2023, 06:44 AM
RE: Kill a directory in DOS - by mnrvovrfc - 11-30-2023, 07:08 AM
RE: Kill a directory in DOS - by SpriggsySpriggs - 11-30-2023, 12:22 PM
RE: Kill a directory in DOS - by grymmjack - 11-30-2023, 12:48 PM
RE: Kill a directory in DOS - by SMcNeill - 11-30-2023, 02:17 PM
RE: Kill a directory in DOS - by mnrvovrfc - 11-30-2023, 02:35 PM
RE: Kill a directory in DOS - by Kernelpanic - 11-30-2023, 09:05 PM
RE: Kill a directory in DOS - by SMcNeill - 11-30-2023, 09:25 PM
RE: Kill a directory in DOS - by eoredson - 12-01-2023, 06:54 AM



Users browsing this thread: 14 Guest(s)