Differences
This shows you the differences between the selected revisions of the page.
| 2019-03-05 | 2019-05-31 | ||
| typo (martin) | correct executable name (martin) | ||
| Line 16: | Line 16: | ||
| </code> | </code> | ||
| - | It will execute ''winscp.com'', entering an interactive WinSCP scripting prompt. Now WinSCP will //wait// for you to type your commands (WinSCP is not aware of the batch file). On the other hand ''cmd.exe'' (which interprets the batch file), waits for ''winscp.com'' to close, before it even checks the following batch file lines. Only after you close ''winscp.exe'' (e.g. by typing WinSCP ''exit'' command), ''cmd.exe'' will read the line with the ''open'' command. And ''cmd.exe'' will fail executing it, as it does not know any ''open'' command. | + | It will execute ''winscp.com'', entering an interactive WinSCP scripting prompt. Now WinSCP will //wait// for you to type your commands (WinSCP is not aware of the batch file). On the other hand ''cmd.exe'' (which interprets the batch file), waits for ''winscp.com'' to close, before it even checks the following batch file lines. Only after you close ''winscp.com'' (e.g. by typing WinSCP ''exit'' command), ''cmd.exe'' will read the line with the ''open'' command. And ''cmd.exe'' will fail executing it, as it does not know any ''open'' command. |
| To execute WinSCP commands in a batch file, you need to use [[commandline#scripting|''/script'' or ''/command'' switches]]. | To execute WinSCP commands in a batch file, you need to use [[commandline#scripting|''/script'' or ''/command'' switches]]. | ||