Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to release the file after making it Read Only
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00874354
Message ID:
00874474
Views:
38
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
*****************************************************************
Previous
Reply
Map
View

Click here to load this message in the networking platform