Using Form Data to Create Batch File

  • Thread starter mattc66 via AccessMonster.com
  • Start date
M

mattc66 via AccessMonster.com

Hi All,

Is there a way to create a DOS Batch file from information the user would
input on an ACCESS form?

Or Edit an exsisting BAT file from a form.

Reason- I have a legacy software program that I can run BATCH files to
extract data. I need to change the parameters of the Batch file to extract
certain. Rather then creating hundreds of Batch Files it would be great if I
could have Access create them on the fly and just over-right them each time.

Matt
 
J

John Vinson

Is there a way to create a DOS Batch file from information the user would
input on an ACCESS form?

Yes, you'll need some VBA code to do it, though. See the VBA online
help for the OpenFile and Write operators.

John W. Vinson[MVP]
 
T

twas

A DOS batch file is basically just text with a special file extension; if
you have a basic batch file and parameters already, it should be easy to
generate the right test as a output from Access. There may be easier
approaches, but it depends on what you have in Access and what you need in
the batch files. This will almost certainly require some VBS to run, which
makes me wonder if it might be easier just to do everything in VBS. More
details, please.

- twas
 
T

twas

Should have said "VBA" rather than "VBS" (wish I could blame it on a spell
checker instead of posting at 1 am)


twas said:
A DOS batch file is basically just text with a special file extension; if
you have a basic batch file and parameters already, it should be easy to
generate the right test as a output from Access. There may be easier
approaches, but it depends on what you have in Access and what you need in
the batch files. This will almost certainly require some VBS to run, which
makes me wonder if it might be easier just to do everything in VBS. More
details, please.

- twas

mattc66 via AccessMonster.com said:
Hi All,

Is there a way to create a DOS Batch file from information the user would
input on an ACCESS form?

Or Edit an exsisting BAT file from a form.

Reason- I have a legacy software program that I can run BATCH files to
extract data. I need to change the parameters of the Batch file to
extract
certain. Rather then creating hundreds of Batch Files it would be great
if I
could have Access create them on the fly and just over-right them each
time.

Matt

--
Matt Campbell
mattc (at) saunatec [dot] com

Message posted via AccessMonster.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top