Differences
This shows you the differences between the selected revisions of the page.
2017-02-14 | 2017-02-14 | ||
no summary (40.136.196.34) (hidden) (untrusted) | Restored revision 1486371217. Undoing revision 1487089116. (martin) (hidden) | ||
Line 34: | Line 34: | ||
You can have WinSCP [[ui_generateurl|generate a script template for you]] or even a complete batch file. | You can have WinSCP [[ui_generateurl|generate a script template for you]] or even a complete batch file. | ||
- | option batch on | + | ===== [[script_file]] Script file ===== |
- | option confirm off | + | Assemble the commands into a script file. You can name the script file as you like. See [[scripting#example|simple example]] and some [[scripts|useful scripts]]. |
- | open patrickbisch@ftp.howtogeek.com | + | |
- | cd backups | + | Use the ''/script'' [[commandline#scripting|command line]] option to pass the script to the WinSCP [[executables|executable]]. Generally, you should also use ''[[commandline#configuration|/ini=nul]]'' switch to [[scripting#configuration|isolate the script execution from GUI configuration]]. You can embed the complete command line into a Windows batch file (''.bat''), like as follows: |
- | option transfer binary | + | <code batch> |
- | get /testremote* f:\backups\testlocal\* | + | @echo off |
- | synchronize local f:\backups\testlocal testremote | + | winscp.com /ini=nul /script=myscript.txt |
- | exit | + | </code> |
+ | |||
+ | ~~AD~~ | ||
===== [[using]] Using script ===== | ===== [[using]] Using script ===== |