Solved! Convert CRLF to LF

Oct 24, 2018
3
0
10
0
Hello

i was wondering if you can assist in my batch file. i would the output file to be UNIX line ending (LF), however its defaults it to CRLF. I have been looking for 2 weeks for an answer. thanks.



@echo off
set "first=Yes"
(for %%a in ("H:\data dumps\folder\combine\*.csv") do (
if defined first (
type "%%a"
set "first="
) else (
more +1 "%%a"
)
))>"H:\data dumps\folder\combine\test.csv"
 
Oct 24, 2018
3
0
10
0


thank you for your reply.

Ideally I would like to automate this, without the use of Notepad or other utilities.

Use of CMD, batch, or VBA is what I need.

 
Thread starter Similar threads Forum Replies Date
M Apps General Discussion 5
P Apps General Discussion 1
A Apps General Discussion 2
The Paladin Apps General Discussion 4
P Apps General Discussion 2
N Apps General Discussion 1
T Apps General Discussion 31
D Apps General Discussion 1
S Apps General Discussion 1
W Apps General Discussion 1
T Apps General Discussion 1
G Apps General Discussion 1
M Apps General Discussion 2
Z Apps General Discussion 5
velocityg4 Apps General Discussion 8
D Apps General Discussion 3
Reggod Apps General Discussion 1
G Apps General Discussion 1
A Apps General Discussion 13
U Apps General Discussion 7

ASK THE COMMUNITY