newtontech4
asked on
Help with executing remote commands using ROBOCOPY
Using combination of WMIC and ROBOCOPY to execute remote batch script.
WMIC is charged with executing the remote command line and running a batch script:
C:\>WMIC.EXE /NODE:CORPBACCONBPM /User:CORPBACCOBBPM\richo /PASSWORD:mypassword
Process Call Create Commandline=C:\netcopy.bat
The above referenced netcopy.bat executes a ROBOCOPY command
robocopy "C:\C1" "X:\C2" /MIR /COPYALL /V /NC /NDL /NP /B /NFL /LOG:"C:\MYLOGFILE.log" /R:10 /W:30 /ETA
When deploy.bat is executed I get the error:
NTFS Security may not be copied - Destination may not be NTFS.
I am able to execute deploy.bat wihtout issue while on the remote console.
Thanks!
WMIC is charged with executing the remote command line and running a batch script:
C:\>WMIC.EXE /NODE:CORPBACCONBPM /User:CORPBACCOBBPM\richo /PASSWORD:mypassword
Process Call Create Commandline=C:\netcopy.bat
The above referenced netcopy.bat executes a ROBOCOPY command
robocopy "C:\C1" "X:\C2" /MIR /COPYALL /V /NC /NDL /NP /B /NFL /LOG:"C:\MYLOGFILE.log" /R:10 /W:30 /ETA
When deploy.bat is executed I get the error:
NTFS Security may not be copied - Destination may not be NTFS.
I am able to execute deploy.bat wihtout issue while on the remote console.
Thanks!
ASKER
Hi Steve -
Thanks but still can not get beyond the error:
NTFS Security may not be copied - Destination may not be NTFS.
Thanks but still can not get beyond the error:
NTFS Security may not be copied - Destination may not be NTFS.
Is the destination drive NTFS or FAT?
ASKER
NTFS I have also tried the robocopy with the /SEC switch - what is weird is that this works if I run the robocopy command from the console of remote machine. In other words take the WMIC out of the picture. This also happens when I am using psexec.. thanks
You've also tried using a UNC in place of X:?
ASKER
No- wll give it a try - thank you.
ASKER
this is my output following the use of UNC - I also used fully qualified domain name
Started : Mon Oct 15 15:13:19 2007
Source : C:\C1\
Dest : \\corpbaccenter\C2\
Files : *.*
Options : *.* /V /NC /NDL /NFL /S /E /COPYALL /PURGE /MIR /B /NP /ETA /R:10 /W:30
-------------------------- ---------- ---------- ---------- ---------- ---------- --
2007/10/15 15:13:19 ERROR 5 (0x00000005) Changing File Attributes C:\C1\
Access is denied.
Waiting 30 seconds...
Started : Mon Oct 15 15:13:19 2007
Source : C:\C1\
Dest : \\corpbaccenter\C2\
Files : *.*
Options : *.* /V /NC /NDL /NFL /S /E /COPYALL /PURGE /MIR /B /NP /ETA /R:10 /W:30
--------------------------
2007/10/15 15:13:19 ERROR 5 (0x00000005) Changing File Attributes C:\C1\
Access is denied.
Waiting 30 seconds...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Steve -
Is the /B something built in? I am not using it in my command arguments.
I will run the WMIC as a different user.
Thanks
Rich
Is the /B something built in? I am not using it in my command arguments.
I will run the WMIC as a different user.
Thanks
Rich
I was looking at your robocopy command:
robocopy "C:\C1" "X:\C2" /MIR /COPYALL /V /NC /NDL /NP /B /NFL /LOG:"C:\MYLOGFILE.log" /R:10 /W:30 /ETA
According to the help on my version of robocopy this is the backup mode switch.
robocopy "C:\C1" "X:\C2" /MIR /COPYALL /V /NC /NDL /NP /B /NFL /LOG:"C:\MYLOGFILE.log" /R:10 /W:30 /ETA
According to the help on my version of robocopy this is the backup mode switch.
Forced accept.
Computer101
EE Admin
Computer101
EE Admin
https://www.experts-exchange.com/questions/21446873/Robocopy-1-95-Where-can-I-get-it.html