This post is more than 5 years old
261 Posts
0
2626
Batch file for LgDup & shareDup
Hi All,
Is there a way i can build a windows batch file with LgDup & shareDup script in them ?I want to have all the commands at one place in a batch file so that i eliminate having to re-build all of the commands during outage window .If i run cut and paste in the cmd prompt there is no easy way to quickly run them in future .
Please let me know how can i build a windows batch file for lgdup commands ?.
appreciate your time .
dynamox
2 Intern
2 Intern
•
20.4K Posts
0
June 11th, 2012 04:00
login to the control station and enter:
for i in {1..5}
do
echo "sharedup.exe \\\nas-test$i \\\nas-test-temp$i all /sd /log:sharedup_nas-test$i.log"
done
this will echo output to the screen and you can copy and paste it into notepad and save is as .bat file.
dynamox
2 Intern
2 Intern
•
20.4K Posts
1
June 8th, 2012 13:00
can you give me an example of what commands you want to put in a batch file ?
deeppat
261 Posts
0
June 8th, 2012 13:00
Hi Dynamox ,
I want to create batch file for each sharedup / lgdup. If you could help me with one i can make the file for others
e.g
sharedup.exe \\ NAS-TEST \\ NAS-TEST-TEMP all /SD /LOG:sharedup_NAS-TEST.log
thanks for the help !
Rainer_EMC
8.6K Posts
0
June 8th, 2012 13:00
Ever heard about Windows .bat batch files?
dynamox
2 Intern
2 Intern
•
20.4K Posts
1
June 8th, 2012 14:00
so which fields will change from one line to the next one ?
can you install cygwin on your pc ?
deeppat
261 Posts
0
June 8th, 2012 14:00
NAS-TEST will change .
NAS-TEST >NAS-TEST1>NAS-TEST2.
I can try installing but , I am not sure I 'll b'e allowed to install cygwin on the customer machine
thanks!
dynamox
2 Intern
2 Intern
•
20.4K Posts
1
June 9th, 2012 05:00
so you want the output to look something like this ?
\\ NAS-TEST \\ NAS-TEST-TEMP all /SD /LOG:sharedup_NAS-TEST.log
\\ NAS-TEST1 \\ NAS-TEST-TEMP all /SD /LOG:sharedup_NAS-TEST.log
\\ NAS-TEST2 \\ NAS-TEST-TEMP all /SD /LOG:sharedup_NAS-TEST.log
destination (\\nas-test-temp) is not going to change ?
deeppat
261 Posts
0
June 11th, 2012 04:00
Hi Dynamox, this is how i want it to look like-temp- is going to change .
\\ NAS-TEST \\ NAS-TEST-TEMP all /SD /LOG:sharedup_NAS-TEST.log
\\ NAS-TEST1 \\ NAS-TEST-TEMP1 all /SD /LOG:sharedup_NAS-TEST.log
\\ NAS-TEST2 \\ NAS-TEST-TEMP2 all /SD /LOG:sharedup_NAS-TEST.log
thanks!
deeppat
261 Posts
0
June 11th, 2012 22:00
thanks Dynamox . You rule this place .