Deleting Files on the hard drive from a Directory Queue 
Author Message
 Deleting Files on the hard drive from a Directory Queue

I have a directory queue of files located from a scan of a directory.  I
have stored these file names in a queue. After I have processed the
necessary actions with these files how would I delete only the filenames in
the queue from the hard drive from within a CW procedure?

Any help would be appreciated.

Thanks Bill
--
_________________________




Mon, 20 Sep 1999 03:00:00 GMT  
 Deleting Files on the hard drive from a Directory Queue

Hi Bill -

   map
     Module('')
      RemoveFile(*CSTRING),SHORT,RAW,NAME('_remove')
     end
   end

ffq        QUEUE,PRE(ff)
name                    STRING(13)
date                    LONG
time                    LONG
size                    LONG
attrib                  BYTE
                END
ffpointer       long
cFilename       cstring( 14 )
 CODE
  directory( ffq, clip(savedpath) & '\*.htm', ff_:normal )
  If records( ffq )
    Loop ffpointer = 1 to records( ffq )
    get( ffq, ffpointer )
    cfilename = ff:name
    If RemoveFile(cFilename)
    end
   end
  end

hth,

-Jeff



Quote:
>I have a directory queue of files located from a scan of a directory.  I
>have stored these file names in a queue. After I have processed the
>necessary actions with these files how would I delete only the filenames in
>the queue from the hard drive from within a CW procedure?

>Any help would be appreciated.

>Thanks Bill
>--
>_________________________



Jeff Slarve  [Team Topspeed(CW)(Compuserve)]
(CW2003, DET 2.2, RPM, PwrBrw, CPCS, PDLookup, Ultra Tree, G-Reg, etc.) Since 1991
J & S Software Co.  http://www.jssoftware.com
(CIS: 73501,1323) Using Agent 1.0 and loving it!


Mon, 20 Sep 1999 03:00:00 GMT  
 Deleting Files on the hard drive from a Directory Queue

Maybe I'm missing something, but you should just be able to do a CLOSE on
the file handle when you're done with the file, then do a REMOVE on the
file handle.



Mon, 20 Sep 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. new hard drive / which file system?

2. cannot find device or file error when installing 6.1 from cd or from hard drive

3. Really need a function to search hard drive for a file - anyone help

4. Viewing hard drive contents and selecting file?

5. File Directory In Queue

6. Deleting files from directory

7. delete directory with files? LV 6.1

8. I NEED TO DELETE A FILE THE LAST 3 MONTHS (directory)

9. Parallel computing (and hard drive space...)

10. Want to put REALbasic back on my hard drive

11. How can I read the Hard drive's Serial Number

12. ID of hard drive

 

 
Powered by phpBB® Forum Software