Solved

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

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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

808 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