Username with domain name will not work in batch

Advertisement

WHB_BHS
Guest

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?

Reply with quote

Advertisement

Guest-2
Guest

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"

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

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.

Reply with quote

Advertisement

Jerry123
Guest

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?

Reply with quote

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?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

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

Reply with quote

Advertisement

You can post new topics in this forum