Friday, 23 August 2013

Copy local text file to remote desktop

Copy local text file to remote desktop

I am trying to copy a local text file which is in my working directory to
other remote desktop
This is the way I am trying to do as mentioned here
ExecuteCommand("Copy" & Directory.GetCurrentDirectory & "\Output\Files.txt
\\myservername -u username -p password C$\Files.txt")
Public Sub ExecuteCommand(ByVal Command As String)
Dim ProcessInfo As ProcessStartInfo
Dim Process As Process
ProcessInfo = New ProcessStartInfo("cmd.exe", "/K" & Command)
ProcessInfo.CreateNoWindow = True
ProcessInfo.UseShellExecute = True
Process = Process.Start(ProcessInfo)
End Sub
I'm getting this error:
The filename, directory name or volume label syntax is incorrect

No comments:

Post a Comment