I've tested it. If I use
"!P"
, the double quote is escaped correctly.
"!P"
, the double quote is escaped correctly.
¬`¦!"£$%^&*()_+{}~[]#:@;'<>?,./|\
If i use just!P
i get this result.
"¬`¦!"£$%^&*()_+{}~[]#:@;'<>?,./|\"
!P
, you should get no quotes around the value. And actually, it makes little sense to use any placeholder without quotes.
"!P"
as the double quote in the password breaks the way WinSCP handles quoting the string.
¬`¦!"£$%^&*()_+{}~[]#:@;'<>?,./|\
!P
i get this result.
"¬`¦!"£$%^&*()_+{}~[]#:@;'<>?,./|\"
/home/username/They she w/¬`!"£$%^&*()_+-={}~[]#:@;'<>?,.|\/Kispál és a Borz - 02 - Tökéletes Helyettes
¬`¦!"£$%^&*()_+-={}~[]#:@;'<>?,./|\
F:\downloads\One the twar\¬`!£$%^&()_+-={}~[]#@;',\New folder
"!/"
is used with the above remote path I cannot pass this onto anther program as the double quotes cause a conflict. WinSCP will behave differently with this URL. for example, using my custom command via an extension - https://github.com/userdocs/LFTP4WIN-CORE/blob/master/system/applications/winscp/winscp_lftp.WinSCPextension.sh
"%EXTENSION_PATH%" "!U" "!@" "!#" "!S" !/ "!\" "!P"
/home/username/They she w/¬`!"£$%^&*()_+-={}~[]#:@;'<>?,.|\/Kispál és a Borz - 02 - Tökéletes Helyettes
/home/username/They she w/
/home/username/They
"%EXTENSION_PATH%" "!U" "!@" "!#" "!S" "!/" "!\" "!P"
"/home/username/They she w/"
¬`¦!"£$%^&*()_+-={}~[]#:@;'<>?,./|\
!P
breaks the script by having double quotes and the last character technically escaping any other quotes once expanded when using this command format.
"%EXTENSION_PATH%" "!U" "!@" "!#" "!S" "!/" "!\" "!P"
$4
is !S
:
password="$(echo -e $(echo $(echo "$4" | cut -f3 -d":" | cut -f1 -d";") | sed 's/%/\\x/g'))"
"!U" "!@" "!#" "!S" "!/" "!\" "!P"
"!"
should work.
sftp://username@111.111.111.111/home/username/They%20she%20w/%C2%AC%5C%22%60%21%22%C2%A3%22%27%24%25%5E%26*%28%29_%2B-%3D%7B%7D%7E%5B%5D%23%3A%40%3B%27%3C%3E%3F%2C%22./test.txt