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

Russell

Re: Transferring files by WinSCP in batch mode?

Thanks again.

The PuTTY website is now working again, so I'll go off and bother them. :)
Russell
martin

Re: Transferring files by WinSCP in batch mode?

Anonymous wrote:

Finally, when will putty be able to handle by batch in ASCII?

How do I know? :-)
On their wishlist there is an item Line ending conversion in PSCP and PSFTP already. They evidenly do not want to implement that fake ASCII mode, which WinSCP does. So their only option to support for SFTP4 text mode feature (which WinSCP also supports). But the fact is (as they state also), there are very few servers yet, which support SFTP4. I know only VanDyke Shell.
Guest

Re: Transferring files by WinSCP in batch mode?

1) I've found the right place for the password in the
call.

2) -bc goes in a different place and as a separate
command to -b

3) There has to be a carriage return after the last
batch command.

Thanks for your help. We've just upgraded to your latest WinSCP.

Finally, when will putty be able to handle by batch in ASCII?
martin

Re: Transferring files by WinSCP in batch mode?

First of all: I suppose that PuTTYt has it ows support forum or something like that. I do not use PSFTP regularly, so I'm not a right person to be asked.

1) Password is prompted for. Where does that go in the script?

IFAIK Putty does not allow password to be stored anywhere, including script. You may use RSA key authentication instead. You may use Pageant. Alternatively, define your own stored session using Putty, associate a key with it and reuse it with PSFTP (-load sessionname).

2) Only -b works – -bc and -be don't

I do not use it, so I cannot help. Maybe it's meant so, that you have to specify both -b file and -bc/-be parameter, not -bc file.

3) get doesn't do anything

Make sure that there is new-line mark after get command. PSFTP otherwise ignores last batch line (probably bug). To be sure, add some dummy command at the end of the batch.
Guest

Re: Transferring files by WinSCP in batch mode?

1) Password is prompted for. Where does that go in the script?

2) Only -b works – -bc and -be don't

3) get doesn't do anything

Russell
martin

Re: Transferring files by WinSCP in batch mode?

Please, read help to PSFTP.

PSFTP does not support ASCII mode. In fact neither SCP nor SFTP (up to version 3) do support ASCII mode. Read WinSCP's Supported transfer protocols page for more details.
Russell

Re: Transferring files by WinSCP in batch mode?

I've tried this (putty) -

psftp -b xxx.txt

xxx.txt contains open id@server

Whatever I add next gets ignored and I get the password prompt. I also can't specify that I want the file to be transferred in ASII

Russell
martin

Re: Transferring files by WinSCP in batch mode?

There are several command-line SCP/SFTP clients, you may use them. I would recommend you PSCP and SFTP from Putty package.
Russell

Transferring files by WinSCP in batch mode?

Is there a means of initiating a secure file transfer
by means of a .bat script?

Eg winscp.exe -b filename.txt

.txt contains open location
cd /path
ascii
get file

Thank you