Bradman Posted May 17, 2007 Posted May 17, 2007 I have a problem with the syntax using Robocopy. RunWait("robocopy C:\TOOLBOX_FILES$ \\"& $line &"\TOOLBOX_FILES$ /MIR /COPYALL /V /ZB /R:10 /W:30") This command works, I am reading systems names from a text file. When I add the log file function and some more switches, I start having problems. RunWait("robocopy C:\TOOLBOX_FILES$ \\"& $line &"\TOOLBOX_FILES$ /MIR /COPYALL /V /TS /FP /NP /LOG+:"& @ScriptDir &"\ROBOCOPY_LOG.txt /ZB /IPG:100 /R:10 /W:30 /ETA") This above line does not generate the log file and errors out. RunWait('robocopy "C:\TOOLBOX_FILES$" "\\xxxx-xxxx-xx\e$\TOOLBOX_FILES$" /MIR /COPYALL /V /TS /FP /NP /LOG+:"C:\ROBOCOPY_LOG.txt" /ZB /IPG:100 /R:10 /W:30 /ETA') The above line works fine on it's own but when I add the variables I start having problems. Can someone point me in the right direction and let me know where the syntax error is? Thanks, Bradman
Danny35d Posted May 17, 2007 Posted May 17, 2007 $line = 'xxxx-xxxx-xx\e$' RunWait('robocopy "C:\TOOLBOX_FILES$" "\\' & $line & '\TOOLBOX_FILES$" /MIR /COPYALL /V /TS /FP /NP /LOG+:"' & @ScriptDir & '\ROBOCOPY_LOG.txt" /ZB /IPG:100 /R:10 /W:30 /ETA', @ScriptDir) AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
MHz Posted May 17, 2007 Posted May 17, 2007 RunWait('robocopy "C:\TOOLBOX_FILES$" "\\xxxx-xxxx-xx\e$\TOOLBOX_FILES$" /MIR /COPYALL /V /TS /FP /NP /LOG+:"C:\ROBOCOPY_LOG.txt" /ZB /IPG:100 /R:10 /W:30 /ETA') The above line works fine on it's own but when I add the variables I start having problems. Can someone point me in the right direction and let me know where the syntax error is? Thanks, BradmanOnly one variable that I see. RunWait('robocopy "C:\TOOLBOX_FILES$" "\\' & $line & '\TOOLBOX_FILES$" /MIR /COPYALL /V /TS /FP /NP /LOG+:"C:\ROBOCOPY_LOG.txt" /ZB /IPG:100 /R:10 /W:30 /ETA') Give that a try.
Bradman Posted May 17, 2007 Author Posted May 17, 2007 Thank you for the fast reply, I will give it a shot at work. Bradman
Bradman Posted May 18, 2007 Author Posted May 18, 2007 Thank you both. It worked like a champ. Robocopy Rocks! I can finally get some work done!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now