Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change EOL on multiple files in one go

Is there any way in Notepad++ (or even with another tool) to change the line ending automatically on multiple files in one go?

i.e. convert a mix of windows EOL (CRLF) and UNIX EOL (LF) files to be all Windows EOL (CRLF)

like image 440
fduff Avatar asked Jul 05 '12 09:07

fduff


People also ask

How do you change line endings of all files in Visual Studio code?

VS Code => Settings => Files: EoL And choose “\n” as EoL character if you would like your files to have Unix Style line endings and choose “\r\n” if you would like your files to have Windows Style line endings. VS Code — Eol Settings for Files. That settings applies to all new files that you create.

How do you change line endings in Notepad ++?

In Notepad++ go to the View > Show Symbol menu and select Show End of Line. Once you select View > Show Symbol > Show End of Line you can see the CR LF characters visually. You can then use the menu item Edit > EOL Conversion and select Unix (LF).


2 Answers

I have Notepad++ 6.1.2.
In "Edit" menu you have "EOL conversion" that does exactly what you need.

like image 31
Marco Avatar answered Oct 05 '22 23:10

Marco


The Replace dialog can handle extended characters like EOL. Just change "Search Mode" to "Extended", and you can work with EOL (\r\n in Windows or \n in Unix), tabs (\t), etc.

You can also use the Find in Files tab of the dialog to do the replace across multiple files.

Screenshot

like image 61
McGarnagle Avatar answered Oct 05 '22 23:10

McGarnagle