Batch script stops after first call to other batch script

前端 未结 3 1524
温柔的废话
温柔的废话 2021-01-11 12:52

I\'m attempting to execute a batch script that currently looks like this:

D:
cd D:My Documents\\FtpSolution\\Test
getftp.bat
call delimconvert.exe
call conve         


        
相关标签:
3条回答
  • 2021-01-11 13:15

    Use call:

    Calls one batch program from another.
    
    CALL [drive:][path]filename [batch-parameters]
    
      batch-parameters   Specifies any command-line information required by the
                         batch program.
    

    If you invoke other batch files without call then control is passed to them but not back again (which is what call changes).

    0 讨论(0)
  • 2021-01-11 13:24

    Try using "Goto :EOF" rather than "exit" at the end of the batch file that you're calling - in your case, the getftp.bat file... That's what fixed mine - tested on Win10 enterprise.

    0 讨论(0)
  • 2021-01-11 13:26

    use start command to launch it in a new window.

    start /wait getftp.bat

    0 讨论(0)
提交回复
热议问题