Skip to content

Instantly share code, notes, and snippets.

@Programator2
Last active December 8, 2018 09:11
Show Gist options
  • Save Programator2/b3ca370af42cf1fe256b4170a8867264 to your computer and use it in GitHub Desktop.
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.
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