Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Deleting a directory of files
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00932927
Message ID:
00932943
Vues:
21
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform