[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Deleting Files



 If you are (as Carl said) using Xy3 and cant use a U2 subrutin to erase
the files and then go back to xy to continue your program without answering
the y/n question, you can use Carls DOS command, but with an
ECHO command and a pipe <|> to send the "y" that the del program is asking
for:

Xy3:
 DOS /C ECHO Y | DEL *.*

Xy4:
 DOS/NV/Z /C ECHO Y | DEL *.*

  Of course, be carefull with it, perhaps you can fill the full path to
avoid fatal erases:

BC DOS /C ECHO Y | DEL C:\HERE\THERE\*.*

(I supose you are in a english windows or dos version, in spanish I use S/N
instead of Y/N)

  Francisco Barrau

----- Original Message -----
From: "Harry Binswanger" 
To: 
Sent: Friday, April 23, 2004 11:16 PM
Subject: Re: Deleting Files


> Brian wrote:
>
> >After looking through the manuals, I find that there's no way to "blind"
> >delete all the files in a directory (i.e. DEL *.* or DEL *).
>
> I'm not sure what the problem is--is it that shelling out to DOS and doing
> a del *.* gives you a (y/n) prompt? Or is it that you don't know how to
> shell out to DOS under program control? If the latter, the XPL pseudo-code
is:
>
> dos /c del *.*
>
> while in DOS, you'll have to hit "y" to do the actual deletion. Then it
> will automatically come back to Xy.
>
> If you can't deal with hitting the "y" there are work-arounds, but they
are
> not elegant.
>
>
> Harry Binswanger
> hb@xxxxxxxx
>
>