Differences
This shows you the differences between the selected revisions of the page.
| scripting 2025-04-11 | scripting 2025-11-06 (current) | ||
| Line 1: | Line 1: | ||
| ====== Scripting and Task Automation ====== | ====== Scripting and Task Automation ====== | ||
| - | //test This article contains detailed description of scripting/automation functionality. You may want to see [[guide_automation|simplified guide]] to the functionality instead.// | + | //This article contains detailed description of scripting/automation functionality. You may want to see [[guide_automation|simplified guide]] to the functionality instead.// |
| In addition to [[interfaces|graphical interface]], WinSCP offers scripting/console interface with many [[#commands|commands]]. The commands can be typed in interactively, or read from script file or another source. | In addition to [[interfaces|graphical interface]], WinSCP offers scripting/console interface with many [[#commands|commands]]. The commands can be typed in interactively, or read from script file or another source. | ||
| Line 72: | Line 72: | ||
| The optional ''rel'' part, with syntax ''[-+]time[YDHNS]'', produces past (''-'') or future (''+'') timestamps. One of the following units must be used: ''Y'' (years), ''D'' (days), ''H'' (hours), ''N'' (minutes) or ''S'' (seconds). For example, the ''%TIMESTAMP-1D#yyyy-mm-dd%'' (the ''-1D'' meaning one day in the past) resolves to ''2016-06-21'' on 22 June 2016. | The optional ''rel'' part, with syntax ''[-+]time[YDHNS]'', produces past (''-'') or future (''+'') timestamps. One of the following units must be used: ''Y'' (years), ''D'' (days), ''H'' (hours), ''N'' (minutes) or ''S'' (seconds). For example, the ''%TIMESTAMP-1D#yyyy-mm-dd%'' (the ''-1D'' meaning one day in the past) resolves to ''2016-06-21'' on 22 June 2016. | ||
| - | To use ''<nowiki>%TIMESTAMP...%</nowiki>'' on a command-line in a batch file, you need to escape the ''%'' by doubling it to ''<nowiki>%%TIMESTAMP...%%</nowiki>'', to avoid a batch file interpreter trying to resolve the variable. | + | To use ''<nowiki>%TIMESTAMP...%</nowiki>'' on a command-line in a ==?timestamp_batch== batch file, you need to escape the ''%'' by doubling it to ''<nowiki>%%TIMESTAMP...%%</nowiki>'', to avoid a batch file interpreter trying to resolve the variable. |
| ==== [[arguments]] Script Arguments ==== | ==== [[arguments]] Script Arguments ==== | ||