Subject Re: deleting files in a remote directory
From Ken Mayer <>
Date Thu, 9 Aug 2018 21:18:20 -0700
Newsgroups dbase.getting-started

On 8/9/2018 5:24 PM, Charlie wrote:
> Hi Ken.. Does this mean there is no way to delete files from a directory unless you know the file names?

Well, your code needs to know the file names, yes. But you don't need to

You use an array (untested, but something along these lines):

aFiles = new array()
aFiles.dir( "C:\SomeFolder\*.jpg" )
          // default is five columns, so size/5 gives the number of
          // files in the array
for i = 1 to aFiles.size/5
     // array has five columns, you want the current row (i), and the
     // first column, which should be the filename ...
     delete file "C:\SomeFolder\" + aFiles[i, 1]
    // no need to do what you were doing with a file object


*Ken Mayer*
Ken's dBASE Page:
The dUFLP:
dBASE Books:
dBASE Tutorial: