Differences

This shows you the differences between the selected revisions of the page.

2014-11-19 2014-11-20
splitting command line (martin) using %timestamp% in batch file (martin)
Line 59: Line 59:
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 a 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]]. 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 a 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]].
 +
 +To use ''%TIMESTAMP%'' on command-line in a batch file, you need to escape the ''%'' by doubling it to ''<nowiki>%%TIMESTAMP%%</nowiki>'', to avoid batch file interpreter trying to resolve the variable.
&beta_feature &beta_feature

Last modified: by martin