Last active
December 8, 2018 09:11
-
-
Save Programator2/b3ca370af42cf1fe256b4170a8867264 to your computer and use it in GitHub Desktop.
This script is useful if you have files that were somehow splitted (DVR recorders do this) and you want to join them back into one file. Simply fill out string OUTPUT_FILENAME and tuple of INPUT_FILES with files you want to join and run the script.
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
OUTPUT_FILENAME = '' | |
INPUT_FILES = ( | |
'', | |
) | |
with open(OUTPUT_FILENAME, 'bw') as output: | |
print(f'Opened {OUTPUT_FILENAME} for writing') | |
for path in INPUT_FILES: | |
with open(path, 'br') as f: | |
print(f'Writing {path} to the output') | |
output.write(f.read()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment