0
I'm trying to merge multiple text files into one single file. The problem with the command below is that it creates several whitespaces in the final merged file content and can't have any spaces. How can I fix the script to remove all the whitespaces from the file content?
@echo off
For %%I in (*.txt) do (
type %%I >> MERGED.tmp
Echo. >> MERGED.tmp
)
REN MERGED.tmp MERGED.txt
Exit
Here is how it looks with the white spaces
This is the desired result
Are you referring to space in the file name, or white space in the file content? If file content, then you need to be more specific as to exactly what you want removed. An example of original source followed by desired output would probably help. – dbenham – 2014-01-16T21:03:54.363
The white space is in the file content. I have multiple text files containing a list of numbers and I trying to combine all these file into one single file. Ex text1.txt A00001L1 B00002L4 C00003L2 X00004L5 Z00005L3 The script Im using is adding a white space at the end of the last number when I merge it. – YOREL – 2014-01-17T15:04:37.583