Hey Louis!

 

Thanks for your quick answer which helped me alot! Actually I just copied 
deltree.com to my C: directory and put in my autoexec.bat

 

alias rd=C:\deltree.com /y

 

Now when I do “rd C:\directory\directory2” it deletes the specified directory. 
I know it’s a pretty dirty solution (especially dangerous with /y switch) but I 
guess this works out for me :). Open for any suggestions! 

 

Regards

Hans

 

Von: Louis Santillan [mailto:lpsan...@gmail.com] 
Gesendet: Dienstag, 29. März 2016 17:40
An: Discussion and general questions about FreeDOS. 
<freedos-user@lists.sourceforge.net>
Cc: Christian Koch <c.k...@scheerkoch.de>
Betreff: Re: [Freedos-user] Catch "rd" order before command.com processing

 

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 
<mailto: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 
<http://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 <http://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