X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Trace-PostClient-IP: 68.147.131.211 From: Brian Inglis Newsgroups: comp.os.msdos.djgpp Subject: Re: deleting subdirectories Organization: Systematic Software Message-ID: <1garl0hcqp134ds79ssmgviaar0tbgiis6@4ax.com> References: X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Lines: 28 Date: Fri, 01 Oct 2004 19:04:26 GMT NNTP-Posting-Host: 24.71.223.147 X-Complaints-To: abuse AT shaw DOT ca X-Trace: pd7tw2no 1096657466 24.71.223.147 (Fri, 01 Oct 2004 13:04:26 MDT) NNTP-Posting-Date: Fri, 01 Oct 2004 13:04:26 MDT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Fri, 01 Oct 2004 13:29:27 +0200 in comp.os.msdos.djgpp, Rafael García wrote: >I need a function to delete a subdirectory tree including files. > >I tried using system("rd /s/q unziptmp") but this does not work. It >seems system() tries to do the job but it doesn't know "/s" parameter. >Well, I only want to let the command interpreter do it so I used "cmd /c >rd /s/q unziptmp". > >This is working in WinXP but I need to run it now in a Windows NT system >and it does not work. I get this message: "La sintaxis del comando no es >correcta", in english something like "Incorrect command syntax". > >I tried to write a "deltree.bat" with "rd /s /q %1" but it's the same. > >Then I tried with "cmd /c rd /s /q %1" in "deltree.bat" and yes, this >works. But it is so ugly... > >Anyone has a better idea? system( "rm -r unziptmp" ) -- Thanks. Take care, Brian Inglis Calgary, Alberta, Canada Brian DOT Inglis AT CSi DOT com (Brian[dot]Inglis{at}SystematicSW[dot]ab[dot]ca) fake address use address above to reply