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

martin

Re: When the script runs as a scheduled task.

Jerry123 wrote:

also make sure you open the session using "open" command. The Open command? This should be part of the stored session, SWMC-FTP-PDF correct?

Do not open the session by passing stored session name on command line, use "open" command.
https://winscp.net/eng/docs/scriptcommand_open
https://winscp.net/eng/docs/guide_automation

Here's my issue; when I run a .bat file by double-clicking it, then WinSCP works perfectly within that script.

When I Schedule the .bat file to run, it runs, but the WinSCP part of the script is ignored/does not execute for some reason.

Can you help?

Please read FAQ:
https://winscp.net/eng/docs/faq_scheduler
Guest

WinSCP not running in Script when a Scheduled Task

Here's my issue; when I run a .bat file by double-clicking it, then WinSCP works perfectly within that script.

When I Schedule the .bat file to run, it runs, but the WinSCP part of the script is ignored/does not execute for some reason.

Can you help?
Jerry123

When the script runs as a scheduled task.

What does it mean "runs in batch"? A Scheduled Task running .bat file

also make sure you open the session using "open" command. The Open command? This should be part of the stored session, SWMC-FTP-PDF correct?
martin

Re: FTP command not working in BATCH

Guest-2 wrote:

But when the script runs in batch it does not. Can anyone help?

What does it mean "runs in batch"?
Also make sure you open the session using "open" command.
Guest-2

FTP command not working in BATCH

When I interactively run a script file, my FTP command works.
But when the script runs in batch it does not. Can anyone help?

Here is my script;
"c:\Program Files\WinSCP\winscp.com" SWMC-FTP-PDF /command "option batch continue" "option confirm off" "put e:\swmc\SWMC-Availability\consultProvidersPrt.cfm.pdf" "close" "exit"
WHB_BHS

Thanks, that worked. I simply could not find that info when I was searching for an answer.
WHB_BHS

Username with domain name will not work in batch

I need to log in to an FTP server using a username that includes a domain name, but WinSCP is mis-interpreting the username. Without the domain name, I get the following after the password has been submitted from my script:
530 Subdomain not specified. Example username: acme/janet@example.com.
Connection failed.
Password prompt (no password provided or last login attempt failed)

When I add the domain name (using the above example), I get the following message:
Local directory: default, Remote directory: /janet@example.com:password@IP addrees, Update: No, Cache: Yes
Cache directory changes: Yes, Permanent: Yes
DST mode: 1
------------------------------------------------------------
Username prompt (no username provided).

I can connect in interactive mode using the domain name, but batch does not like this. Can anyone help?