Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2009-03-31
3
Medium Priority
?
246 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 41

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 41

Accepted Solution

by:
Kyle Abrahams earned 2000 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

610 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