Re: Deleting Files
- Posted by pampeano at ROCKETMAIL.COM Jul 18, 2001
- 394 views
Well, the easiest and safest way you can use, is to use the euphoria dir() function to get the file listing of that directory. Then look trough the sequence looking for the files with that extention and using deleteFile() with each one. Untested code: constant Where = "C:\My Documents" sequence dirlist dirlist = dir(Where) for I = 1 to length(dirlist) do if find(".doc",dirlist[I][D_NAME]) then -- D_NAME is defined in file.e deleteFile(Where & dirlist[I][D_NAME]) end if end for Best Regards, Guillermo Bonvehi > Date: Wed, 18 Jul 2001 11:01:50 +1000 (AUS Ea > From: mjwalter at deakin.edu.au > Subject: Deleting Files > > > > I know this is a lame question, but I am new to euphoria, > Using Win32lib or any other library, what command can be used to > delete a > number of files in a folder using wildcards (eg. *.doc). I have used > the > command for deleting 1 file (deleteFile) but cant get it to delete a > whold > lot simultaneously. > > Thanks > Mark