Shell script value replacement

Advertisement

Dird
Guest

Shell script value replacement

Hi,

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

Reply with quote

Dird
Guest

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

Reply with quote

Advertisement

You can post new topics in this forum