Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
COPY command
Message
 
To
13/05/2011 05:17:41
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
01510543
Message ID:
01510552
Views:
67
>If I use yor code
>
>oFS = CREATEOBJECT([scripting.FileSystemObject])
>
>SORCEFILE="C:\AA\ŠĆŠ.DOC"
>TARGETFILE="C:\TMP\AA\ŠĆŠ.DOC"
>
>oFS.CopyFile(SorceFile, TargetFile, 1)
>
>error ocurs
>
>"ole error code 0x800a004c: Unknown COM status code"
>
>Where am I wrong?
>
>Thanks in advance Boris.

You can't overwrite a file which is marked as readonly.
So try this:
oFS = CREATEOBJECT([scripting.FileSystemObject])

SORCEFILE="C:\AA\ŠĆŠ.DOC"
TARGETFILE="C:\TMP\AA\ŠĆŠ.DOC"
TRY
  oFS.DeleteFile(TargetFile, .t.)
CATCH
ENDTRY
oFS.CopyFile(SorceFile, TargetFile, .t.)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform