Start another batch file with multiple parameters with the start command?

magicbennie

Is it possible to start another batch file and pass along multiple parameters with spaces, using the start command?

Here is how my program currently works:

main program starts > sees its outdated > calls updater (data1.exe) > updater copies new version over > It tries to delete the old version, but it can't. The old version is still marked as being used, from when it called the updater.

That's why the call command won't work. Do I need to use start then? How would that work?

This was the original line of code... the one that calls the updater and passes the variables along:

call "%dirofbatch%data1.exe" "%downloc%" "%dirofbatch%" "%lver%" "%lget%"

I'm stumped.

EDIT: I should mention that "data1.exe" is just an exe'd batch file.

Endoro

How to read parameters in a batch file:

  1. caller batch

    start "" "%dirofbatch%data1.exe" "%downloc%" "%dirofbatch%" "%lver%" "%lget%"
    
  2. called batch

    set "parm1=%~1"
    set "parm2=%~2"
    set "parm3=%~3"
    set "parm4=%~4"
    echo %parm1% %parm2% %parm3% %parm4%
    

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Batch file "start" command and parameters

From Dev

"start" command in .bat batch file

From Dev

Windows start command not able to execute batch file

From Dev

"Start" command not working while running a batch file

From Dev

Escaping commas in batch file START command?

From Dev

Batchfile: Using "start" Command to Start a batch file on a specific label

From Dev

Batch start with parameters Error

From Dev

Batch start with parameters Error

From Dev

Windows batch file start another batch with elevated rights

From Dev

Continue Batch File even if path/target used in START command is wrong

From Dev

Continue Batch File even if path/target used in START command is wrong

From Dev

Keep a batch-file after the "start" command is used

From Dev

End a process started with START command in a Windows Batch File

From Dev

How could I start/display a file in lua, like the batch command "start"?

From Dev

Start Windows batch file maximized

From Dev

Output redirection in batch while using start command

From Dev

using a batch file to run a ps1 file but hide the command prompt after start?

From Dev

Start cmd /k and then close at the end of another batch

From Dev

batch start path\this file's file name

From Dev

How Can I Write a Batch File Where I Start one Program and When that Program Finishes or Closes, Start Another

From Dev

How Can I Write a Batch File Where I Start one Program and When that Program Finishes or Closes, Start Another

From Dev

Why does a program started by a batch file using command start not run while it runs via Windows Explorer?

From Dev

Using start command to open new window with /V:ON enabled and also run a batch file

From Dev

How I can I start a powershell command line from a batch file and enforce it to stay open?

From Dev

Batch file to start all programmes in the start folder of XP

From Dev

WAMP : start mysql through PHP and Batch file

From Dev

Batch file to start browser minimized and kill it after

From Dev

batch file to start when a new document is saved

From Dev

Run Batch File On Start-up

Related Related

  1. 1

    Batch file "start" command and parameters

  2. 2

    "start" command in .bat batch file

  3. 3

    Windows start command not able to execute batch file

  4. 4

    "Start" command not working while running a batch file

  5. 5

    Escaping commas in batch file START command?

  6. 6

    Batchfile: Using "start" Command to Start a batch file on a specific label

  7. 7

    Batch start with parameters Error

  8. 8

    Batch start with parameters Error

  9. 9

    Windows batch file start another batch with elevated rights

  10. 10

    Continue Batch File even if path/target used in START command is wrong

  11. 11

    Continue Batch File even if path/target used in START command is wrong

  12. 12

    Keep a batch-file after the "start" command is used

  13. 13

    End a process started with START command in a Windows Batch File

  14. 14

    How could I start/display a file in lua, like the batch command "start"?

  15. 15

    Start Windows batch file maximized

  16. 16

    Output redirection in batch while using start command

  17. 17

    using a batch file to run a ps1 file but hide the command prompt after start?

  18. 18

    Start cmd /k and then close at the end of another batch

  19. 19

    batch start path\this file's file name

  20. 20

    How Can I Write a Batch File Where I Start one Program and When that Program Finishes or Closes, Start Another

  21. 21

    How Can I Write a Batch File Where I Start one Program and When that Program Finishes or Closes, Start Another

  22. 22

    Why does a program started by a batch file using command start not run while it runs via Windows Explorer?

  23. 23

    Using start command to open new window with /V:ON enabled and also run a batch file

  24. 24

    How I can I start a powershell command line from a batch file and enforce it to stay open?

  25. 25

    Batch file to start all programmes in the start folder of XP

  26. 26

    WAMP : start mysql through PHP and Batch file

  27. 27

    Batch file to start browser minimized and kill it after

  28. 28

    batch file to start when a new document is saved

  29. 29

    Run Batch File On Start-up

HotTag

Archive