Solved

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

Posted on 2009-03-31
3
225 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
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…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

744 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now