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

dschomburg

I figured it out.

Oddly enough the leading spaces do matter in the bat file. For example: before /log there are two spaces, before /command there are two spaces and before the "open, "put and "exit there are four.
I didn't include them in my bat file. When I did, it magically worked.
dschomburg

Unknown command '^' when running bat file created with MS Access

WinSCP version = 5.13.1 (build 8265)
Opsys = Win 10 Pro
Office = 365

I'm creating the bat file in VBA using the FileSystemObject's CreateTextFile method.
When I run the bat file I receive the following error in the log.

< 2018-04-09 19:59:44.874 Script: Active session: [1] myuser@ftp.mysite.com
> 2018-04-09 19:59:44.875 Script: ^
< 2018-04-09 19:59:44.876 Script: Unknown command '^'.
. 2018-04-09 19:59:44.877 Script: Failed
. 2018-04-09 19:59:44.877 Script: Exit code: 1
. 2018-04-09 19:59:44.878 Closing connection.
. 2018-04-09 19:59:44.878 Sending special code: 12
. 2018-04-09 19:59:44.879 Sent EOF message

Does anyone have any idea why I would be receiving this and how to resolve the issue? When I run the auto generated script create from WinSCP it works fine but when I try to recreate it in VBA it fails.

Thank you for any advice/help.