Topic "Username with domain name will not work in batch"

Author Message
WHB_BHS

Guest


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?
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
You have to escape the slash:
http://winscp.net/eng/docs/session_url
_________________
Martin Prikryl
WHB_BHS
[View user's profile]

Joined: 2012-04-03
Posts: 3
Location: Birmingham, AL
Thanks, that worked. I simply could not find that info when I was searching for an answer.
Guest-2

Guest


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"
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
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.
_________________
Martin Prikryl
Jerry123

Guest


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?
Guest




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?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
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.
http://winscp.net/eng/docs/scriptcommand_open
http://winscp.net/eng/docs/guide_automation

Quote:
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:
http://winscp.net/eng/docs/faq_scheduler
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License