del C:\directory\*.*
rd C:\directory

Even that will fail, I think, if there are some hidden files/folders.
Start with that and you can build it into an alias command in freecom.

alias myrd="del %1%\*.* ; rd %1%"

I believe that's the right syntax.

-L

On Tuesday, March 29, 2016, Hans-Christian Koch <hc.k...@scheerkoch.de>
wrote:

> Hey all!
>
>
>
> Once again I am trying to run some old programs under Linux emulation
> DOSEMU which is making use of FREEDOS. In one of them you have the option
> to delete directories, it does it like this:
>
> del C:\directory\*.rec
>
> del C:\directory\*.dat
>
> del C:\directory\eti.bin
>
> rd C:\directory
>
>
>
> As “rd” only removes directories if they are empty the folder to be
> removed must only contain files of types .rec, .dat and a file eti.bin else
> it won’t be removed. My problem is that today there are some other files in
> this folder too so I can’t remove it from within my program.
>
> The appropriate way to delete directories would be ‘deltree’ I guess but
> that’s a standalone .com program while rd and del are part of command.com.
> I tried to create a file rd.bat which should catch the call but if I do
> “rd.bat” freedos wants to remove the directory “.bat”. Is there any way to
> get a workaround to this or how can I compile my own version of
> command.com?
>
>
>
> Thanks
>
> Hans-Christian
>
>
>
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to