What does TransferMode=2 mean in the WinSCP.ini file mean?

Advertisement

mostokes
Joined:
Posts:
4

What does TransferMode=2 mean in the WinSCP.ini file mean?

We are using the WinSCP.exe to execute FTP file transfers between two Windows servers. The WinSCP.ini file has a setting in it called TransferMode=2. What does that setting mean?

Our original problem is, after the file is FTPd from server one to server 2, line breaks are being inserted in the middle of data records, which causes problems when we try to import the file into SQL Server via a DTSX package.

Reply with quote

Advertisement

mostokes
Joined:
Posts:
4

Re: What does TransferMode=2 mean in the WinSCP.ini file mean?

martin wrote:

It means "Automatic" (mask-based) mode.

Thanks prikryl. Have you ever heard of files becoming corrupted during the FTP process? The file I'm transferring is almost 11 mb in size. Prior the being FTPd the file is ok. After the file reaches the destination server, it includes line breaks where there shouldn't be line breaks (in between records, etc.). Thanks for any help you can provide.

Reply with quote

mostokes
Joined:
Posts:
4

Re: What does TransferMode=2 mean in the WinSCP.ini file mean?

martin wrote:

It means "Automatic" (mask-based) mode.

One thing I forgot to mention. I am doing an automated FTP transfer, by executing WinSCP.exe using a scheduled task on the SQL Server. The WinSCP file is configured (see below) to import 2 text files. The second file (CareTechDonorProfile.txt) is what we're having trouble with. Is there a way to force binary in the WinSCP.ini file settings. I read that someone else solved a crlf problem by forcing a binary file transfer. But they did it through the GUI interface. Thanks.

option batch on
option confirm off
open sftp://xxxxxxxx:#####@sftp.######.org -hostkey="ssh-dss 1024 xx:xx..."
get /CareTechDonorGiftView.txt c:\import\
get /CareTechDonorProfile.txt c:\import\
exit

Reply with quote

mostokes
Joined:
Posts:
4

Re: What does TransferMode=2 mean in the WinSCP.ini file mean?

martin wrote:

It means "Automatic" (mask-based) mode.

YOU CAN DISREGARD MY RESPONSES TO YOUR ANSWER...

I found this forum post, which resolved my issue. https://winscp.net/forum/viewtopic.php?t=4540
When I changed the WinSCP.ini setting to TransferMode=0 and re-FTPd the file, everthing worked just fine. Thanks for your help.

Reply with quote

Advertisement

Satya
Guest

Re: What does TransferMode=2 mean in the WinSCP.ini file mean?

martin wrote:

It means "Automatic" (mask-based) mode.

what is the TransferMode value for Binary?

Reply with quote

martin
Site Admin
martin avatar

Re: What does TransferMode=2 mean in the WinSCP.ini file mean?

Satya wrote:

what is the TransferMode value for Binary?
0 (zero). What do you need this for?

Reply with quote

Advertisement

You can post new topics in this forum