Sanjana Sarangi
asked on
Copying of folder from one machine to another using vbscript
Hi,
I want to copy one folder from my windows app server to a citrix server. I used robocopy but it doesn't work when I run from local machine using vbscript for testing purpose. my source is my app server and destination is local machine. Please help me out in this
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
dim vLogBase
dim vFinalFolder, vCopyCmd
dim oWSExec
vSourceFolder = "\\appserver\Desktop\Folde r"
vDestinationFolder = "D:\" 'local path
vCopyCmd = "robocopy /MIR " & chr(34) & vSourceFolder & chr(34) & " " & chr(34) & vDestinationFolder & chr(34)
Msgbox "Invoking copy command with :" & vCopyCmd
Set oWSExec = WScript.CreateObject ("WSCript.shell")
oWSExec.run vCopyCmd, 6, True
set oWSExec = nothing
This is my code.. I am getting robocopy error 1265. Please help
dim vFinalFolder, vCopyCmd
dim oWSExec
vSourceFolder = "\\appserver\Desktop\Folde
vDestinationFolder = "D:\" 'local path
vCopyCmd = "robocopy /MIR " & chr(34) & vSourceFolder & chr(34) & " " & chr(34) & vDestinationFolder & chr(34)
Msgbox "Invoking copy command with :" & vCopyCmd
Set oWSExec = WScript.CreateObject ("WSCript.shell")
oWSExec.run vCopyCmd, 6, True
set oWSExec = nothing
This is my code.. I am getting robocopy error 1265. Please help
Code is correct, please check permission as I said before (obviously on your PC, open explorer to \\appserver\Desktop\Folder )
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ya it is showing I do not have access. How do I proceed in this? If I have to move from server to another server. How should I get past this?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Post your script so we can see what you're trying to do.
Why wrap it in VBSscript?
Why, in fact, VBScript and not say, PowerShell?