I'm trying to create a quick .bat to sort some data from cards quickly. But I'm wording if its possible to take the data I'm collecting, and have it sorted in excel automatically. If I could have the data separated by commas, it would be simply to convert it to a csv and be done. but the results.txt file sorts it like this:
FN: EXAMPLE A
FN: EXAMPLE B
TITLE: EXAM A
TITLE: EXAM B
ORG: EX A
ORG: EX A
and I want it to look more like
FN: Example A, Example B
Title: EXAM A, EXAM B
ORG: EX A, EX B
Any tips for this?
@Echo off
cd /d %~dp0
copy/B *.vcf all_in_one.vcf
copy/B all_in_one.vcf master_list.txt
(
findstr /C:"FN:" master_list.txt
findstr /C:"TITLE:" master_list.txt
findstr /C:"ORG:" master_list.txt
findstr /C:"EMAIL;" master_list.txt
findstr /C:"TEL;TYPE=WORK:" master_list.txt
)>> results.txt
pause
Edit: Is there a way to transpose the data?
such as:
FN: Title: Org:
Example A Exam A Ex A
Example B Exam B Ex B