Hello,
I saw the batch command on this website as I was looking for a way to merge multiple text file into one file.
@echo off
for /r %%i in (*.txt) do (
if not %%~nxi == output.txt (
echo %%~nxi >> output.txt
type "%%i" >> output.txt
echo. >> output.txt
echo ============================================== >> output.txt
)
)
I wonder whether anyone could modify this command to merge files in the way I want. I have multiple response files from each person from a few hundred people. What I am trying to do is to combine multiple files from each person into one file, then combine individuals' files into one. My files are named in the following way and stored in one directory.
Q1_Person A.txt
Q1_Person B.txt
Q1_Person C.txt
Q2_Person A.txt
Q2_Person B.txt
Q2_Person C.txt
Q3_Person A.txt
Q3_Person B.txt
Q3_Person C.txt
I want these multiple files combined into one big text file that looks like this:
Person A (Person ID precedes the data)
Q1
Q2
Q3
========
Person B
Q1
Q2
Q3
========
Person C
Q1
Q2
Q3
I appreciate any help you can provide!!!
I saw the batch command on this website as I was looking for a way to merge multiple text file into one file.
@echo off
for /r %%i in (*.txt) do (
if not %%~nxi == output.txt (
echo %%~nxi >> output.txt
type "%%i" >> output.txt
echo. >> output.txt
echo ============================================== >> output.txt
)
)
I wonder whether anyone could modify this command to merge files in the way I want. I have multiple response files from each person from a few hundred people. What I am trying to do is to combine multiple files from each person into one file, then combine individuals' files into one. My files are named in the following way and stored in one directory.
Q1_Person A.txt
Q1_Person B.txt
Q1_Person C.txt
Q2_Person A.txt
Q2_Person B.txt
Q2_Person C.txt
Q3_Person A.txt
Q3_Person B.txt
Q3_Person C.txt
I want these multiple files combined into one big text file that looks like this:
Person A (Person ID precedes the data)
Q1
Q2
Q3
========
Person B
Q1
Q2
Q3
========
Person C
Q1
Q2
Q3
I appreciate any help you can provide!!!