Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

jodikohn

Re: Command to Specify a Space in Remote Directory Path in a .cmd file

@Martin - Thanks for your response and the link to the command line syntax. I remember trying that too without success.

Long story short... I reached out to the receiving party and asked if they would remove the space between the two words in the directory name. They did, and everything is working now.

We can put this one to bed.
martin

Re: Command to Specify a Space in Remote Directory Path in a .cmd file

jodikohn wrote:

Generate session URS/code shows to reference it after the port as /New%20directory/ That doesn't work. The log shows it is trying to drop it in /New0directory

That's for URL. But you want "script", right? So switch to "Script" tab, it will show you this syntax:
"put \\servername\sharename\*.txt ""/New Directory/"""

See also https://winscp.net/eng/docs/commandline#syntax
jodikohn

Command to Specify a Space in Remote Directory Path in a .cmd file

Remote directory to drop file(s) has a space in its name. What's the correct syntax for this statement? I can drop the files into the New Directory using the UI just fine.

Here's an example: "put \\servername\sharename\*.txt /New Directory"

Generate session URS/code shows to reference it after the port as /New%20directory/ That doesn't work. The log shows it is trying to drop it in /New0directory

Excerpt from log: Copying 1 files/directories to remote directory "/New0directory"

Thanks,
Jodi