0

Getting scp: ambiguous target while transferring file to white spaced folder name in Windows 10 (both pc). I already tried solutions mentioned in here and also tried another solution on different question.

following commands are already tried,

  1. scp -i "key" test.txt "user@host:E:New\\ folder",
  2. scp -i "key" test.txt user@host:"E:New folder",
  3. scp -i "key" test.txt user@host:"'E:New folder'",
  4. scp -i "key" test.txt "user@host:'E:New folder'",
  5. scp -i "key" test.txt user@host:"E:New\ folder"

Still getting ambiguous target. Is there any mistake? how to overcome this ?

1 Answers1

0

You can transfer the file this way when the folder name is spaced

sshpass -p pass scp -r 32.zip user@host:'"C:\\New folder\\"'

Another way is this

sshpass -p pass scp -r 32.zip user@host:C:\\New\\\ folder\\

use \\\ Instead of space