After some more research I found that you can't use UNC paths with filesystemobject.
http://www.15seconds.com/Issue/990429.htm says that "The FileSystemObject will not accept a virtual path and cannot obtain the network access necessary to resolve a UNC name."
Thats OK, I'll just have to move my PRG over to that computer.
>Hi,
>
>I'm trying to use the CopyFolder method from the FileSystemObject. I want to back up some directories (and all their contents). Since VFP 7 doesn't have an easy way to do this I decided to try to use the FileSystemObject.
>
>I think the reason why I'm having problems is because I'm trying to copy directories on another computer on our network.
>
>Just to make sure I could get it to work I tried:
>
>
>loFs = CREATEOBJECT("Scripting.FileSystemObject")
>loFs.CopyFolder("c:\ctemp", "c:\ctemp2")
>
>
>And it worked. But when I tried the following:
>
>
>lcFrom = "\\webtest\D\webclnt\"
>lcTo = "\\webtest\D\WebClntBakOct72004\"
>
>loFs = CREATEOBJECT("Scripting.FileSystemObject")
>
>SCAN
> lcClnt = ALLTRIM(Iwc_ID)
> lcClntWD = lcFrom + lcClnt + "\IMIRMWeb\IMWebDocs\"
> lcClntCSS = lcFrom + "html\" + lcClnt + "\images\"
> lcClntBak = lcTo + lcClnt + "\"
>
> IF DIRECTORY(lcClntWD)
> MD &lcClntBak
>
> MESSAGEBOX(DIRECTORY(lcClntWD))
> MESSAGEBOX(DIRECTORY(lcClntBak))
>
> loFs.CopyFolder(lcClntWD, lcClntBak)
> ENDIF
>
> EXIT
>ENDSCAN
>
>
>it failed. I get the error "OLE Error code 0x800a004c: Unknown COM Status Code." With CopyFolder can you use paths like "\\webtest\D\webclnt\"? Or does it have to be mapped? Any other way to do this?
>
>Thanks,
>Chris