Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: help with batch prgramming  (Read 2558 times)

0 Members and 1 Guest are viewing this topic.

michaewlewis

    Topic Starter


    Intermediate
  • Thanked: 26
    • Yes
    • Yes
  • Experience: Expert
  • OS: Unknown
help with batch prgramming
« on: November 22, 2006, 11:36:47 AM »
I'm trying to write a simple batch program to open two programs with a very long line of arguments kind of like this:
start "C:\Program Files\program folder\program.exe" D:\folder\file1.aatrend D:\folder\file2.aatrend D:\folder\file3.aatrend etc. etc.
 
However when I use the start function, it only opens the first file in the arguments.
When I don't use the start function, it opens all of the files very well, the only thing is, I can't get any further in the batch program.
 
What would be the best method to open two or more programs with many arguments?

Sidewinder



    Guru

    Thanked: 139
  • Experience: Familiar
  • OS: Windows 10
Re: help with batch prgramming
« Reply #1 on: November 22, 2006, 03:44:43 PM »
The processor may be confused with all those literals strung out as to whether they are programs or parameters.

Try passing the program names along the batch file call and changing your batch file to handle them sequentially.

batchname "C:\Program Files\program folder\program.exe" D:\folder\file1.aatrend D:\folder\file2.aatrend D:\folder\file3.aatrend etc. etc.

The batch file would be structured something like this:

Code: [Select]
@echo off
:tag
if .%1==. goto end
start %1
shift
goto tag
:end

Just a thought.  8-)
The true sign of intelligence is not knowledge but imagination.

-- Albert Einstein

michaewlewis

    Topic Starter


    Intermediate
  • Thanked: 26
    • Yes
    • Yes
  • Experience: Expert
  • OS: Unknown
Re: help with batch prgramming
« Reply #2 on: November 22, 2006, 04:30:58 PM »
thanks for the help.
Did I mention that I've only been into batch programming for a grand total of 20 hours? That didn't make much sense to me, but if you would be so kind as to elaborate a little further, I'll do my best to understand.
thanks for the reply.