Last active
January 3, 2016 13:09
-
-
Save paretech/8467603 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Merge indexed text files and print the result | |
@ECHO OFF | |
SETLOCAL EnableDelayedExpansion | |
:: User Config | |
SET ina_base=part1_ | |
SET inb_base=part2_ | |
SET out_base=sum12_ | |
SET ext=txt | |
FOR %%i IN (%ina_base%*.%ext%) DO ( | |
SET ina_filename=%%i | |
SET inb_filename=!ina_filename:%ina_base%=%inb_base%! | |
SET out_filename=!ina_filename:%ina_base%=%out_base%! | |
COPY !ina_filename! + !inb_filename! !out_filename! | |
:: Automatically open, print (default printer) and | |
:: close text files. | |
NOTEPAD /P !out_filename! | |
) | |
:END | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment