Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to update a file with word pad then run that file in a batch file

Status
Not open for further replies.

bolobaboo

MIS
Aug 4, 2008
120
US
Hi
I am newbee when comes scripting in dos. I have a file which needs to be updated with folder name using wordpad each time before a batch file is run.
Folder names are provided in text file.

file to be updated ( test.osj)
=============================
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<ICArchiver job="test">
<vendor>IBM</vendor>
<version>5.5.1.0</version>
<creation date="2008-07-29" time="14:57:34" user="nm31453adm"/>
<last-modification date="2008-07-31" time="15:36:43" user="nm31453adm"/>
<archive type="Tivoli Storage Manager">
<host>cbdstsm1.pharma.aventis.com</host>
<port></port>
<name>SA-HSM1</name>
<user></user>
<passwd></passwd>
</archive>
<source-files backup-before-migrate="true">
<directory action="replace" location="\\CBDSAPPOSM01\E$\Tivoli\20080721" recurse="true"/>
<include age="0.01:00:00" type="creation-older-than"></include>
</directory>
</source-files>
</ICArchiver>

text file which has folder names
================================
20061221
20061222
20070109
20070110
20070111
20070112

batch file to be run
===================
"C:\Program Files\Tivoli\TSM\hsmclient\dsmclc.exe" "C:\Program Files\Tivoli\TSM\hsmclient\jobs\test.osj" >> "D:\hsm_logs\hsm_sched.log
 
I needs to update following line
<directory action="replace" location="\\CBDSAPPOSM01\E$\Tivoli\20080721" recurse="true"/>

with folder names from list then run batch file once done then go back and update with next folder name and run same batch file again till all folders ran.
I would appreciate if any body can help on this.
Thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top