To push a file from a Linux terminal to a Windows system, the following two examples work just fine.
scp /home/user.name/file.html [email protected]:/C:/Users/user.name/test_folder/file.html
scp /home/user.name/file.html [email protected]:"/C:/Users/user.name/test_folder/file.html"
I need to do this where the local folder has spaces and I cannot change the name,
say /C:/Users/user.name/test folder/
All of the following fail with the message scp: ambiguous target
scp /home/user.name/file.html [email protected]:"/C:/Users/user.name/test folder/file.html"
scp /home/user.name/file.html [email protected]:"/C:/Users/user.name/test\ folder/file.html"
scp /home/user.name/file.html [email protected]:"'/C:/Users/user.name/test\ folder/file.html'"
scp /home/user.name/file.html [email protected]:"/C:/Users/user.name/test\\ folder/file.html"
scp /home/user.name/file.html [email protected]:"'/C:/Users/user.name/test\\ folder/file.html'"
scp /home/user.name/file.html [email protected]:"/C:/Users/user.name/test\\\ folder/file.html"
scp /home/user.name/file.html [email protected]:"'/C:/Users/user.name/test\\\ folder/file.html'"
How do I get this to work?
scp /home/user.name/file.html '[email protected]:/C:/Users/user.name/test folder/'
. If that doesn't work, next thing is to readscp
source code to find out how it parses this argument.