How about something like:
lcPath = addbs(sys(5)+curdir()) + "CIS\" + addbs(thisdir)
lnRetVal = adir(laFiles, lcPath + "*.*")
for lnI = 1 to lnRetVal
lcFile = lcPath + laFiles[lnI, 1]
if directory(lcFile)
loop
endif
lnHandle = fopen(lcFile, 12)
fclose(lnHandle)
if lnHandle > 0
erase (lcPath + lcFile)
endif
endfor
>Hi,
>
>I am using the following statement to delete files in a directory prior to removing the directory (contains Excel and PDF files)
>
>DELETE FILES sys(5)+curdir()+"\CIs\"+thisdir+"\*.*
>
>How do I test to see if any of the files in the directory are open before I attempt to delete them ?
>
>Thanks in advance
>Carmel
Mark McCasland
Midlothian, TX USA