Topic "^M at the end of each line when I edit in winscp"

Author Message
g1967
[View user's profile]

Joined: 2007-07-23
Posts: 2
I frequently copy files from my unix enviroment to my winxp workstation, edit through Winscp using the open or edit function and then copy the files back to the unix server. When I do this I get a ^M at the end of each file when you display in unix. How can I edit these files in windows and winscp without having the ^M added to the end of each file?
Thanks,
Greg
Advertisements
g1967
[View user's profile]

Joined: 2007-07-23
Posts: 2
Sorry, I am using version 4.0.3 build 345
Greg
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
If you are using an external editor, either:
1) Instruct it to use Unix line endings
2) or configure it as an external editor for WinSCP, use edit, not open, and check "force text transfer mode for files edited in external editor"
_________________
Martin Prikryl
Guest




Hi,
I experience a similar problem. The ^M is added by WinSCP during the transfer, even without editing anything.

Just do this:
1) transfer a text file from Unix => Win
2) transfer it back from Win => Unix
3) edit the newly received file in Unix (i.e. using vi)

you will see the Windows' /n at the end of the line, and will have to do a 'dos2unix' for that file.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
Anonymous wrote:
Just do this:
1) transfer a text file from Unix => Win
2) transfer it back from Win => Unix
3) edit the newly received file in Unix (i.e. using vi)

you will see the Windows' /n at the end of the line, and will have to do a 'dos2unix' for that file.

What transfer mode are you using? Text or binary? Have you used the same mode for download and upload? Had the file unix line endings originally (on unix side, before step 1)? What end-of-line characters have you configured on Environment tab of login dialog for your session?
_________________
Martin Prikryl
marrtins

Guest


Is it possible to specify transfer mode in FAR manager plugin? It`s really annoying when i get converted CR/LF<->LF and vice verse Evil or Very Mad

Thnx!
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
marrtins wrote:
Is it possible to specify transfer mode in FAR manager plugin? It`s really annoying when i get converted CR/LF<->LF and vice verse Evil or Very Mad

Sure. In plugin settings you can set default mode. On transfer options dialog, you can change mode for particular transfer.
_________________
Martin Prikryl
marrtins

Guest


No realy sure where to find that option, look here is `transfer settings` dialog in FAR manager


Here is `About` window

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
It can be set in plugin configuration since 1.6 only. But even in 1.5.1 you can set the transfer mode on the upload/download box.
_________________
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