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

martin

Re: Editing batch files

Internal editor works only with Windows style line endings. So WinSCP always converts the remote file before it opens it in the internal editor (an coverts it back when upliding the file back). Problem is that WinSCP does not expect presence of text files in different formats on remote server.

So unfortunatelly to solve your problem you need to use external editor that supports both unix and windows style text files and make sure you use binary transfer mode when downloading to/uploading from the editor. See Editing binary files.

About editor: I use integrated editor of my favourite file manager (FAR). However I believe that you won't have problem finding some (try PSPad.com and UltraEdit.com).
percheron

Editing batch files

I am using WinSCP 3.7.4 (build 271) accessing Linux servers. I use the Norton command interface.

I often edit both Unix and Windows text files on these servers. Example: netlogon.bat and numerous *.cmd or *.bat files in Windows cr/lf text format, as well as Unix scripts in lf format.

My problem is that when I edit a batch file such as netlogon.bat with the internal WinSCP editor, it strips out the carriage returns and makes it unreadable by the Winodows machines.

Likewise, I do not want to introduce carriage returns in the Unix shell scripts and other similar files.

I have tried numerous combinations of the various settings in WinSCP and can't seem to hit on the right method. I have searched this forum and the web in general but have not seen this problem specifically addressed.

I would very much prefer to use the internal editor vs notepad. Also I frequently have to download WinSCP on a client's machine to access the server so I don't want to carry along another editor program. However, I would welcome a suggestion for an editor that would deal with this problem.

Is there a recommended combination of settings to easily handle both Windows and Unix script files?

Thanks for a great product!