Differences
This shows you the differences between the selected revisions of the page.
2007-01-18 | 2007-04-04 | ||
faq#scripting_automation (martin) | 4.0 ftp, winscp.exe (martin) | ||
Line 44: | Line 44: | ||
===== [[console]] The Console Interface Tool ===== | ===== [[console]] The Console Interface Tool ===== | ||
- | As ''WinSCP3.exe'' is a GUI application, it cannot inherit the console window when run from another console application (such as the Windows command-prompt). To allow this, run WinSCP using the console interface tool ''WinSCP3.com'' (you can find ''WinSCP3.com'' in the main [[installation|installation package]]). | + | As ''WinSCP.exe'' is a GUI application, it cannot inherit the console window when run from another console application (such as the Windows command-prompt). To allow this, run WinSCP using the console interface tool ''WinSCP.com'' (you can find ''WinSCP.com'' in the main [[installation|installation package]]). |
With console interface tool you can also use input/output redirection and pipes. | With console interface tool you can also use input/output redirection and pipes. | ||
===== Running a Script under a Different Account ===== | ===== Running a Script under a Different Account ===== | ||
- | If you are going to run the script under a different account (for example using the Windows scheduler), note that WinSCP [[config|stores its configuration]] to the user part of Windows Registry by default. So you may need to either transfer the configuration from your account registry to the other account registry or use the [[config|INI file]] instead. | + | If you are going to run the script under a different account (for example using the Windows scheduler), note that WinSCP may [[config|store its configuration]] to the user part of Windows Registry by default. So you may need to either transfer the configuration from your account registry to the other account registry or use the [[config|INI file]] instead. |
- | Note that the configuration also includes [[ssh#verifying_the_host_key|verified host keys]], which you may need to transfer as well (or confirm manually under the account) to allow automatic execution of the script. | + | Note that the configuration also includes [[ssh#verifying_the_host_key|verified SSH host keys]], which you may need to transfer as well (or confirm manually under the account) to allow automatic execution of the script. |
- | ·· | + | |
===== Example ===== | ===== Example ===== | ||
Line 87: | Line 86: | ||
Save the script to the file ''example.txt''. To execute the script file use the following command. As the script connects the session itself, using the command ''open'', omit the ''session'' command-line parameter. | Save the script to the file ''example.txt''. To execute the script file use the following command. As the script connects the session itself, using the command ''open'', omit the ''session'' command-line parameter. | ||
<code> | <code> | ||
- | winscp3.exe /console /script=example.txt | + | winscp.exe /console /script=example.txt |
</code> | </code> | ||
Instead of using ''open'' command you can also open a session using a [[commandline|command-line parameter]]. | Instead of using ''open'' command you can also open a session using a [[commandline|command-line parameter]]. | ||
<code> | <code> | ||
- | winscp3.exe /console /script=example.txt user@example.com | + | winscp.exe /console /script=example.txt user@example.com |
</code> | </code> | ||