Re: [Freedos-user] Catch "rd" order before command.com processing
Hey guys! >> Nevermind my answer. This may work directly from prompt but not from >> within my program. I guess I need to do it in command.com. So can you > >recommend any good documentation on how to compile freecom and maybe which source? > > Is this program something you wrote or somebody else? Is it closed source? Because this is really sounding like some extreme (i.e. not > recommended) workarounds for a flawed design. > > You can recompile FreeCOM, but I wouldn't recommend it. I'd suggest you fix your program (if at all possible). Of course, that may not be feasible. > Well there is really no way I can get the scource of this program. It was written before my time without proper version management and I only have got the newest scource and there is unfortunately no possibility to get the one I need... That's why I was looking for some kind of workaround but of course recompiling freecom was not the answer I was hoping for :). Anyway thanks for the helpful resources, I'll take a look! > I would seriously recommend against doing so. One typo, like an accidental space after the directory slash(es) and you wipe out far more than you intend, without any safeguard against it. It's pretty much like taking a shotgun with buckshot to shoot yourself in the foot. "Ab is' ab..." Thanks for your concern but it's only dispensable data and the automatic call through the program should not cause errors but you'll never know. Actually I found an additional protection in deltree which spoils unintended deletion of data from root directory. However as "alias" is only working in prompt it won't matter I guess (or maybe it will if I am going for the freecom compile...) -- 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=/4140 ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] Catch "rd" order before command.com processing
Hi, On Tue, Mar 29, 2016 at 12:14 PM, Hans-Christian Kochwrote: > > Nevermind my answer. This may work directly from prompt but not from within > my program. I guess I need to do it in command.com. So can you recommend any > good documentation on how to compile freecom and maybe which source? Is this program something you wrote or somebody else? Is it closed source? Because this is really sounding like some extreme (i.e. not recommended) workarounds for a flawed design. You can recompile FreeCOM, but I wouldn't recommend it. I'd suggest you fix your program (if at all possible). Of course, that may not be feasible. The sources on SourceForge for FreeCOM are for old stable 0.82pl3, which (AFAIK) needs TurboC (or maybe TC++), but I don't know if that includes Suppl or not. (I haven't tried lately, plus there is no active maintainer.) * https://sourceforge.net/projects/freedos/files/FreeCOM/082pl3%20%28use%20xmsswap%20for%20386%2B%20PC%29/com082pl3.zip/download * http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/devel/libs/suppl/suppl26a.zip * http://edn.embarcadero.com/article/20841 (Turbo C 2.01) * http://edn.embarcadero.com/article/21751 (Turbo C++ 1.01) I don't see any 0.84pre2 sources on iBiblio in the obvious place (pointed to by read-only Software List, in "BASE"), but I think I can find it elsewhere. * http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/dos/command/ * https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.0/pkgs/commands.zip This one (I assume) already has Suppl inside, but here it is anyways (just in case): * https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.0/pkgs/suppls.zip Jeremy once said that the SVN version of FreeCOM compiles with OpenWatcom and works fine, but I haven't tested it myself. Nevertheless, here it is, if you really want to recompile: * https://sourceforge.net/code-snapshots/svn/f/fr/freedos/svn/freedos-svn-1736-freecom-trunk.zip -- 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=/4140 ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] Catch "rd" order before command.com processing
On 3/29/2016 9:41 AM, Hans-Christian Koch wrote: 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 J. Open for any suggestions! I would seriously recommend against doing so. One typo, like an accidental space after the directory slash(es) and you wipe out far more than you intend, without any safeguard against it. It's pretty much like taking a shotgun with buckshot to shoot yourself in the foot. "Ab is' ab..." Ralf --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus -- 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=/4140___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] Catch "rd" order before command.com processing
Nevermind my answer. This may work directly from prompt but not from within my program. I guess I need to do it in command.com. So can you recommend any good documentation on how to compile freecom and maybe which source? -- 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=/4140___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] Catch "rd" order before command.com processing
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=/4140___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user