Differences
This shows you the differences between the selected revisions of the page.
2014-08-04 | 2014-10-10 | ||
american spelling (martin) | no summary (125.17.1.98) (hidden) | ||
Line 2: | Line 2: | ||
When you have your automation task implemented using WinSCP [[scripting|script]], you may sooner or later find yourself limited by its capabilities. The scripting particularly lacks (by design) any support for control structures (like conditional processing, loops/cycles, etc.). A solution is to convert your script to code that uses [[library|WinSCP .NET assembly]]. | When you have your automation task implemented using WinSCP [[scripting|script]], you may sooner or later find yourself limited by its capabilities. The scripting particularly lacks (by design) any support for control structures (like conditional processing, loops/cycles, etc.). A solution is to convert your script to code that uses [[library|WinSCP .NET assembly]]. | ||
- | ===== Choosing Language ===== | + | @echo off |
- | Start by choosing a language. WinSCP .NET assembly can be used from any .NET language or any language that supports COM. | + | set winscp=C:\WinSCP\WinSCP.com |
- | + | echo option batch continue > ngscript.tmp | |
- | If you do not have your own preferred language, use [[library_powershell|Windows PowerShell]]. | + | echo option confirm off >> ngscript.tmp |
+ | echo open ftp://NG\FTPServicePro:S3rv1c3Pr0@OC2-EDC-SER-029 >> ngscript.tmp | ||
+ | echo synchronize local -criteria=either C:\FTPTemp\RTX /RTX >> ngscript.tmp | ||
+ | echo exit >> ngscript.tmp | ||
+ | %winscp% /script=ngscript.tmp | ||
+ | del ngscript.tmp | ||
===== Mapping Script Commands to .NET Assembly Calls ===== | ===== Mapping Script Commands to .NET Assembly Calls ===== |