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
The only WORKING solution i found for multiple files/folders, after googling for 1 hour is this:
Found this solution via this discussion:
You can also set the default EOL in notepad++ via "Settings" -> "Preferences" -> "New Document/Default Directory" then select "Unix/OSX" under the Format box.
Note: One can always use an out-of-band option using the command line:
unix2dos *.cmd
dos2unix *.sh
I have Notepad++ 6.1.2.
In "Edit" menu you have "EOL conversion" that does exactly what you need.
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.
Use replace all with regular expression
(\r?\n)|(\r\n?)
to
\r\n
This will match every possible line ending pattern (single \r, \n or \r\n) back to \r\n (Windows).
To operate on multiple files, either:
To convert multiple files into one directory and recursively. Just install PythonScript on Notepad ++, then use the script below
https://gist.github.com/bjverde/583c2ee8b386994f3a1f8acdea3b7ed2