WinSCP : How to enter a script parameter with spaces without resolving the double quotes on WinSCP script?
By : user2360558
Date : March 29 2020, 07:55 AM
it should still fix some issue %~3 expands input variable %3 removing surrounding qoutes. You can also do a slightly cleaner script, by not having the double redirect to file in each line.
echo open sftp://user:pass@cagprod/
echo option batch continue
echo option confirm off
echo cd /ccr/ccar_modsub/Unsecured_Production/CCAR_Models/Model_Code_Version/Acct_lvl/HK_CARD/Code
echo get * "Y:\1. Documents\Automated file copying\%~3\Code\"
echo Hello >> test_file.txt