Differences
This shows you the differences between the selected revisions of the page.
| guide_automation 2023-10-04 | guide_automation 2026-06-03 (current) | ||
| Line 5: | Line 5: | ||
| //This guide contains a simplified description of automating operations on FTP/SFTP server with WinSCP. You may want to see [[scripting|detailed documentation]] of the scripting functionality instead//. | //This guide contains a simplified description of automating operations on FTP/SFTP server with WinSCP. You may want to see [[scripting|detailed documentation]] of the scripting functionality instead//. | ||
| - | WinSCP offers [[scripting]] interface that you can use to automate many operations that it supports, inluding file transfers, synchronization and other operations. | + | WinSCP offers [[scripting]] interface that you can use to automate many operations that it supports, including file transfers, synchronization and other operations. |
| //There is also [[library|WinSCP .NET assembly]] built on top of the scripting interface. If you plan to call WinSCP from your .NET code or [[library_powershell|PowerShell]], or if your task requires conditional processing, loops or other control structures, you should better use the .NET assembly. This guide focuses on simple automation tasks using scripting interface only.// | //There is also [[library|WinSCP .NET assembly]] built on top of the scripting interface. If you plan to call WinSCP from your .NET code or [[library_powershell|PowerShell]], or if your task requires conditional processing, loops or other control structures, you should better use the .NET assembly. This guide focuses on simple automation tasks using scripting interface only.// | ||
| Line 58: | Line 58: | ||
| ===== [[using]] Using script ===== | ===== [[using]] Using script ===== | ||
| Now to make using script easier/automatic you can: | Now to make using script easier/automatic you can: | ||
| - | * Make shortcut to it on desktop to ease execution. Either make shortcut to batch file (''.bat'') or enter full command line to shortcut itself.((Note that it is not possible to use ''winscp.com'' (''.com'' files in general) directly from a shortcut. Call ''winscp.com'' from a batch file or use ''winscp.exe'' with ''[[commandline#scripting|/console]]'' command-line parameter.)) | + | * Make shortcut to it on desktop to ease execution. Either make shortcut to batch file (''.bat'') or enter full command line to shortcut itself.((Note that it is not possible to use ''winscp.==com=='' (''.com'' files in general) directly from a shortcut. Call ''winscp.com'' from a batch file or use ''winscp.exe'' with ''[[commandline#scripting|/console]]'' command-line parameter.)) |
| * If the wrapping batch file takes filename as command line parameter (see [[#parametrized|below]]) you can: | * If the wrapping batch file takes filename as command line parameter (see [[#parametrized|below]]) you can: | ||
| * Make shortcut to it on desktop and use it by dropping files on the icon. Windows automatically run the batch file and passes path to dropped file as command-line parameter. | * Make shortcut to it on desktop and use it by dropping files on the icon. Windows automatically run the batch file and passes path to dropped file as command-line parameter. | ||
| - | * In a similar way you can put the shortcut to the batch file into Explorer’s ‘Send To’ context menu (''C:\Users\username\AppData\Roaming\Microsoft\Windows\SendTo'' in Windows Vista and newer). &winpath &winvista | + | * In a similar way you can put the shortcut to the batch file into Explorer’s ‘Send To’ context menu (''C:\Users\username\AppData\Roaming\Microsoft\Windows\SendTo''). &winpath |
| * [[guide_schedule|Schedule automatic execution]]. | * [[guide_schedule|Schedule automatic execution]]. | ||