Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Add a carriage return after TYPE

I created a batch file to merge some files

The files are generated automatically and named like this:

TimeEntries_2023-02-24 070714.txt

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

TimeEntries_2023-02-24 082025.txt

TimeEntries_2023-02-25 082025.txt
etc.

So my batch looks like this:

TYPE "C:\TimeEntries_2*" >> "C:\TimeEntries_Merged.txt"

But some textfile don’t end with a carriage return and the last line of one file will by append with the first line of the next file.

How can I add a carriage return or a line feed ?

>Solution :

for %%q in (C:\TimeEntries_2*) do (type "%%q"&echo.)>>C:\TimeEntries_Merged.txt

should accomplish that.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading