Solved

can't robocopy to the multible servers

Posted on 2006-07-01
8
309 Views
Last Modified: 2008-02-01
I'm trying to copy a file with the following small script,but it's not working.What's wrong with it ?Nothing happens when it is run.

Basically,I want to do is :

Copy *.XDB file
FROM C:\Scripts\SAVscripts TO   all the servers that I have in LatestXDB.txt file.
Destination on these servers is \\%%i\C$\Program Files\SAV
Finally create a log file for the result in C:\Scripts\SAVscripts\Logs\


Here is the small script that I'm using :

FOR /F %%i in (D:\Support\scripts\symantec\LatestXDB.txt) do robocopy.exe "C:\Scripts\SAVscripts" "\\%%i\C$\Program Files\SAV" *.xdb /w:1 /r:1 /zb /V /LOG+:C:\Scripts\SAVscripts\Logs\LatestXDB.log

I do have full access on the destination folders.
Any comment?
Thanks

0
Comment
Question by:shebnem
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
8 Comments
 
LVL 85

Expert Comment

by:oBdA
ID: 17026358
My guess is that LatesXDB.txt is saved in unicode; the "for" command can't handle this. Either save it in ANSI (open in notepad, "Save as", choose ANSI in the dropdown menu), or use 'type LatestXDB.txt' in the for loop:
FOR /F %%i in ('type "D:\Support\scripts\symantec\LatestXDB.txt"') do robocopy.exe "C:\Scripts\SAVscripts" "\\%%i\C$\Program Files\SAV" *.xdb /w:1 /r:1 /zb /V /LOG+:C:\Scripts\SAVscripts\Logs\LatestXDB.log
0
 

Author Comment

by:shebnem
ID: 17026809
I've tried both,didn't work unfortunatelly.
Thanks for the suggestion anyway...
0
 
LVL 85

Expert Comment

by:oBdA
ID: 17026836
Anything in the log file?
Put an "echo" in front of robocopy.exe, run the script again and check if the correct commands are listed.
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 

Author Comment

by:shebnem
ID: 17027161
I've checked the log files,nothing specific to this job.
I've put an "echo".It just  appears for a sec and disappears.
0
 
LVL 85

Expert Comment

by:oBdA
ID: 17027941
Seems like you looked in the event log? I was talking about the "LatestXDB.log" file; is it created, and if so, is there something in it?
In addition, you can add a "/tee" (verify this, I'm not completely sure it's the correct one) to the options, which will display robocopy's output on the screen as well as in the log file.
When testing batch scripts, always run them from a command window, not by double-clicking them in Explorer, it's easier to see error messages.
You can add a "pause" at the end to stop the command window from closing after being started from Explorer, but this will help you nothing if the script errors out before it reaches the pause command, so go for the first solution.
0
 

Author Comment

by:shebnem
ID: 17039721
One of my friend found out what the problem is.Here is the correct line :

FOR /F %%i in (D:\Support\scripts\symantec\XDBdelivery\LatestXDB.txt) do robocopy.exe "\\cmvismon1\c$\Scripts\SAVscripts" "\\%%i\VPHOME" *.XDB /w:1 /r:1 /zb /tee /V /LOG+:D:\Support\scripts\symantec\XDBdelivery\LatestXDB.log



and changed the permissions on shares.It worked great.
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 17076056
Closed, 125 points refunded.
Netminder
Site Admin
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Learn about cloud computing and its benefits for small business owners.
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question