Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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

Guest

Re: Trouble putting a file with spaces in the name

martin wrote:

Well, we need to know, what language is that.

If it is VB, it should be like:

="""C:\Program Files\WinSCP\WinSCP.exe"" /console /command ""option confirm off"" ""option batch off"" ""open FileList"" ""put """"\\Server1\MyFiles\Daily Inpatient File*%TimeStamp#yyyy-mm-dd%.csv"""""" ""exit"" "

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

Depending on a way you execute the command, you may also need to double the %.




Martin,

Yes it was VB, and your code worked.
Thank you very much for your help.

David
:D :D :D :D :D :D
martin

Re: Trouble putting a file with spaces in the name

Well, we need to know, what language is that.

If it is VB, it should be like:

="""C:\Program Files\WinSCP\WinSCP.exe"" /console /command ""option confirm off"" ""option batch off"" ""open FileList"" ""put """"\\Server1\MyFiles\Daily Inpatient File*%TimeStamp#yyyy-mm-dd%.csv"""""" ""exit"" "

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

Depending on a way you execute the command, you may also need to double the %.
DWVZ2000

Trouble putting a file with spaces in the name

I am having a problem sending a file to an FTP site that has spaces in the file name. I have tried single quotes, double quotes, double double quotes, etc. and nothing seems to work. It keep saying ".....system file not found....".

I am using Winscp Version 5.7.7 Build 6257.

Below is the script I am using. It keep showing that the file name is "Server1\MyFiles\Daily ".


="C:\Program Files\WinSCP\WinSCP.exe /console /command ""option confirm off"" ""option batch off"" ""open FileList"" ""put \\Server1\MyFiles\\" & ""Daily Inpatient File"" & "*%TimeStamp#yyyy-mm-dd%" & ".csv"" ""exit"" "

Thank you very much for your assistance.

David