Solved

.bat fille - can a find/replace via VBA code be done for a .bat file

Posted on 2009-03-31
3
229 Views
Last Modified: 2012-05-06
Hi EE,
I have a .bat file that executes another pgm.
   This pgm allows to feed in parameters.

Let's say, the parameter is set to run for '2008'' and I want to open the .bat file to globally
replace for '2009', can this be done?

(I have used Word Automation to do mailing labels and mail merge, was wondering if I should
open the .bat file in Word, and do a search and replace in Word etc.)

tx, sandra



0
Comment
Question by:mytfein
  • 2
3 Comments
 
LVL 40

Expert Comment

by:Kyle Abrahams
ID: 24029778
yes it can:
http://www.utteraccess.com/forums/printthread.php?Cat=&Board=83&main=1011627&type=thread

show how to parse a file:
http://www.pptfaq.com/FAQ00913.htm

I would then re-write the file using a replace command.

eg:
rename somefile.txt to somefile - original.txt
open somefile - original.txt
write somefile.txt replacing 2008 with 2009.
next file.
0
 
LVL 40

Accepted Solution

by:
Kyle Abrahams earned 500 total points
ID: 24029789
0
 

Author Closing Comment

by:mytfein
ID: 31564866
Hi Ged,
Skimmed the links that you provided.
Liked the one from Excel. It's clearer.

Will experiment and if have further questions will post again, tx, s
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

679 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