Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to release the file after making it Read Only
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00874354
Message ID:
00874474
Vues:
37
George,
When i am using this oFile.Delete(.T.) instead of delete file(lcsource)
I am getting this error:
*****************************************************
OLE error code 0x800a0046: Unknown COM status code
*****************************************************

I am attaching my delete code:
*****************************************************
IF MESSAGEBOX("Are you Sure," + CHR(13) +;
"Want to DELETE this document from the System?",4+32+256) = 6

**Changing the file to readonly off then will delete
oFSO = CREATEOBJECT("Scripting.FileSystemObject")
oFile = oFSO.GetFile(lcDir+"\"+finame+".tif")

If oFile.Attributes = 33 then
oFile.Attributes = BITAND(oFile.Attributes, BITNOT(1))
EndIf

oFile.Delete(.T.)

STORE NULL TO oFSO, oFile

=messagebox("Document Successfully Deleted from the System.")
Else
Return
Endif
*****************************************************************
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform