Differences
This shows you the differences between the selected revisions of the page.
2014-10-24 | 2014-10-24 | ||
5.6.2 Bug 1223: Timestamp variable in scripting. (martin) | %TIMESTAMP% is beta (martin) | ||
Line 46: | Line 46: | ||
</code> | </code> | ||
- | WinSCP automatically resolves variable ''%TIMESTAMP%'' to real time with format ''20141024161712''.((Unless the variable is already set in environment when WinSCP is started.)) You can customize the format using syntax ''%TIMESTAMP#format%'' where ''format'' may include ''yyyy'' for year, ''mm'' for month, ''dd'' for day, ''hh'' for hour, ''nn'' for minute and ''ss'' for second. For example ''%TIMESTAMP#yyyy-mm-dd%'' resolves to ''2014-10-24''.((Syntax ''%TIMESTAMP#format%'' is resolved by WinSCP to real time, even if ''%TIMESTAMP%'' variable is already set in environment when WinSCP is started.)) See [[http://docwiki.embarcadero.com/Libraries/XE6/en/System.SysUtils.FormatDateTime|other formats you can use]]. | + | WinSCP automatically resolves variable ''%TIMESTAMP%'' to real time with format ''20141024161712''.((Unless the variable is already set in environment when WinSCP is started.)) You can customize the format using syntax ''%TIMESTAMP#format%'' where ''format'' may include ''yyyy'' for year, ''mm'' for month, ''dd'' for day, ''hh'' for hour, ''nn'' for minute and ''ss'' for second. For example ''%TIMESTAMP#yyyy-mm-dd%'' resolves to ''2014-10-24''.((Syntax ''%TIMESTAMP#format%'' is resolved by WinSCP to real time, even if ''%TIMESTAMP%'' variable is already set in environment when WinSCP is started.)) See [[http://docwiki.embarcadero.com/Libraries/XE6/en/System.SysUtils.FormatDateTime|other formats you can use]]. &beta_feature |
You can reference script arguments (passed on command-line using parameter ''[[commandline#scripting|/parameter]]'') using syntax ''%N%'', where ''N'' is ordinal number of argument ((Generally do surround reference by double-quotes to cope properly with spaces in its value.)): | You can reference script arguments (passed on command-line using parameter ''[[commandline#scripting|/parameter]]'') using syntax ''%N%'', where ''N'' is ordinal number of argument ((Generally do surround reference by double-quotes to cope properly with spaces in its value.)): |