H
humbleFunGuy
OS: Windows 2000 server
I am trying to use run XCOPY or xxcopy from my script using schedule
task. The script works fine on the command line but when I run from
the schedule task it does not do anything. The task executes and stops
without any erros.
I am trying to mirror between two folders on networked shared drives.
Set objShell = CreateObject("WScript.Shell")
'map network drive.
objShell.Run("net use j: \\server1\sourceShare /USER:user1 password"),
1, yes
objShell.Run("net use k: \\server2\targetShare /USER:user1 password"),
1, yes
objSehll.Run("mirror j:\source k:\target"), 1, yes
In schedule task this does not do anything, just returns Last
Result=0x0. However, if I run this on the command-line it executes and
works fine.
I know there some issue with context in which each share happens. But
I am not sure how to fix this. Any help is appreciated.
Thanks,
irfan
(e-mail address removed)
I am trying to use run XCOPY or xxcopy from my script using schedule
task. The script works fine on the command line but when I run from
the schedule task it does not do anything. The task executes and stops
without any erros.
I am trying to mirror between two folders on networked shared drives.
Set objShell = CreateObject("WScript.Shell")
'map network drive.
objShell.Run("net use j: \\server1\sourceShare /USER:user1 password"),
1, yes
objShell.Run("net use k: \\server2\targetShare /USER:user1 password"),
1, yes
objSehll.Run("mirror j:\source k:\target"), 1, yes
In schedule task this does not do anything, just returns Last
Result=0x0. However, if I run this on the command-line it executes and
works fine.
I know there some issue with context in which each share happens. But
I am not sure how to fix this. Any help is appreciated.
Thanks,
irfan
(e-mail address removed)