Topic "Shell script value replacement"

Author Message



I'm looking to use this in my winscp call but it doesnt convert it. First I tried shell script because I plan to call it from within a .ksh but C:/$(date +"%d-%m-%Y")_monthly.wri didn't work in:

I then searched for command prompt format & tried:
"C:\Program Files\WinSCP\WinSCP.exe" /console /command "option batch on" "option confirm off" "open user@link" "put C:\%date:~4,2%-%date:~7,2%-%date:~10,4%_monthly.wri

Neither were converted. Any ideas on how to fix it? Ideally without the need for javascript~ surely the current date can be converted? :s


for anyone interested I had it C:\${VALUE}
The \ removes the power of the $ like speech marks avoid this I had to use a double backslash but only before the $ e.g. C:\folder\\${VALUE}.txt

You can post new topics in this forum

Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License