Link to home
Start Free TrialLog in
Avatar of Sanjana Sarangi
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

Avatar of Tony J
Tony J
Flag of United Kingdom of Great Britain and Northern Ireland image

Right, so, some more information would help.

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?
ASKER CERTIFIED SOLUTION
Avatar of Kimputer
Kimputer

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sanjana Sarangi
Sanjana Sarangi

ASKER

dim vLogBase
dim vFinalFolder, vCopyCmd
dim oWSExec

vSourceFolder = "\\appserver\Desktop\Folder"
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
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial