Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can a read-only file be deleted?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00600258
Message ID:
00600264
Vues:
21
>I need to delete a directory that has 2 read-only files in it.
>
>DELETE FILE and ERASE will not remove read-only files. I can not seem to find a way to change the attributes of a file, so then I could delete the files.
>
>I know the RD command will delete the directory once I remove the files.
>I hope I am missing something simple. Any help would be appreciated.
>
>
Steve,

If the WSH is an option, I'd use the Scripting.FileSystemObject in this sort of case
oFSO = CREATEOBJECT("Scripting.FileSystemObject")
* Delete files matching the skeleton
* even if the read-only bit is set
oFSO.DeleteFile(lcfilespec, .T.)
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform