Computing.Net > Forums > Disk Operating System > Editing multiple files with batch

Editing multiple files with batch

Reply to Message Icon

Original Message
Name: Sysadm
Date: January 16, 2004 at 04:36:59 Pacific
Subject: Editing multiple files with batch
OS: Windows 98
CPU/Ram: P4 2.4 Ghz, 512 Mb
Comment:

Hi wizeguys,

Can anyone help me with this problem? I need to update a file used by oracle called tnsnames.ora, wich is located multiple places on one or more local harddrives on a lot of clients. The same data is to be appended to these files if the data isn't allready present in the files.

I've had some succes with the following line from cmd, but it uses all resources on the computer when running for about 10 minutes on a standard ibm client machine and it has to be run on all the local drives one at the time.

for /r %f in (TNSNAMES.ORA) do copy %f+m:\datatofile.txt %f
(M:\ is a share all computers have access to)

Not very clever, since i dont know if all the machines have the same drive letters and this command appends the data nomatter what is in the target file at runtime.

I've tried with the batch add-on locate.com wich seems to find the files i need to update very quickly, but i can't make it update them:

locate tnsnames.ora /R C:"for /r %f in (TNSNAMES.ORA) do copy %f+m:\data_to_file.txt %f"

Any suggestions is appreciated very much..


Report Offensive Message For Removal


Response Number 1
Name: x86
Date: January 17, 2004 at 08:50:06 Pacific
Subject: Editing multiple files with batch
Reply: (edit)

See reply here


Report Offensive Follow Up For Removal

Response Number 2
Name: barteld
Date: January 21, 2004 at 10:16:57 Pacific
Subject: Editing multiple files with batch
Reply: (edit)

well im sorry to say but you wont find anything there.

if ur stating to forum rules then why dont you link to forum rules page instead?


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Editing multiple files with batch

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




How often do you use Computing.Net?

Every Day
Once a Week
Once a Month
This Is My First Time!


View Results

Poll Finishes In 2 Days.
Discuss in The Lounge