filename with spaces in batchmode

Advertisement

arothe
Guest

filename with spaces in batchmode

Hi!
I try to send a file to a SSH server in batchmode. The following command I have used:

winscp3.exe sftp://user@server /privatekey=key.ppk /log=logfile.txt /console /command "option batch on" "option confirm off" "option transfer ascii" "cd /transfer-dir" "put %1" "close" "exit"

%1 is a parameter of a batch file. This parameter contains a filename with a path. Sometimes the path contains space characters and the batch doesn't work. The %1 contains also "", but these characters seems not to be in the executed command line. How I can solve that problem?

Thanx
Andre

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,517
Location:
Prague, Czechia

Re: filename with spaces in batchmode

I'm not sure. It is rather Windows batch-file question. It is even possible (probable) that Windows shell does not support that. As an alternative you can create a temporary WinSCP script file by your batch file and run it.

Reply with quote

Advertisement

You can post new topics in this forum