that looks exactly like what I want to do Tore - thanks.
I am getting error reading on the ENDTRY line that reads errorno 11. function argument value, type, or count in invalid.
I changed you initial line to direct the search (247 files found -so the count is right now)
lnFiles=adir(ladir,'c:\db\prg\*.fxp')
is there something I should be doing past that point I am missing - I have kept rest of it the same
tnx
k
>I do something like this
>
>Erase ListOfFailedFiles.txt
>lnFiles = adir(laDir,'*.fxp')
>for lnX = 1 to lnFiles
> Try
> Erase (laDir(lnX))
> Catch
> Strtofile(laDir(lnX),'ListOfFailedFiles.txt',1)
> EndTry
>Endfor
>If adir(laDir,'ListOfFailedFiles.txt')>0
> modi file ListOfFailedFiles.txt
>Endif
>
>>I am trying to set up a refresh of new programs by removing all fxp files in my directory.
>>Problem is I hit fxp's that are open or in memory.
>>
>>Erase C:/mydir/*.FXP
>>
>>I am trying an< if error()=1719 > then diverting to an error handler.
>>Any suggestions as to what i should put into the error handler to bypass the open files would be appreciated.
>>Or is there an alternate way of doing this outside of manually removing the files
>>
>>tnx
>>k