escape spaces in path during pscp batch copy in windows (pull file)

Advertisement

Pascal
Guest

escape spaces in path during pscp batch copy in windows (pull file)

Hello

Maybe somebody have same issue in past

I would like pull a file from a windows computer wit space in path (I know that is better whitout space but I cannot change organisation for historical configuration

so, my commande is for example

below command not works, I have a message : pscp: C:\Sftpfolder\USER1\EXPORT\accountion\folder with space": Cannot create file

C:\Toolspscp.exe -sftp -v -batch -l USER1 -pw 123456 USER1@XXX.XXX.XXX.XXX:"/folder with space/filename space.xls" "C:\Sftpfolder\USER1\EXPORT\accountion\folder with space\"

below this one works (space can be use for source not for target) strange no ?

C:\Tools\pscp.exe -sftp -v -batch -l USER1 -pw 123456 USER1@XXX.XXX.XXX.XXX:"/folder with space/filename space.xls" C:\Sftpfolder\USER1\EXPORT\accountion\folderwithoutspace\

I have found lot of topic on the web but no one have solution
https://superuser.com/questions/532919/how-to-use-pscp-to-copy-file-from-unix-machine-to-windows-machine-where-target-p

I have tested with "C:\folder with space" or C:\"folder with space" or C:\folder\\ with\\ space

I have space name in source and target

some can help me ?

Thanks in advance

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum