Sinisterly
File Merger Open Source - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Coding (https://sinister.li/Forum-Coding)
+--- Forum: Python (https://sinister.li/Forum-Python)
+--- Thread: File Merger Open Source (/Thread-File-Merger-Open-Source)



File Merger Open Source - ENCRYP73D_GH05T - 12-22-2021

Joins all files together into one file !
Just paste into file and save it as .py

import fileinput
import glob

file_list = glob.glob("*.txt")

with open('result.txt', 'w') as file:
input_lines = fileinput.input(file_list)
file.writelines(input_lines)


RE: File Merger Open Source - mothered - 12-23-2021

Quote:Open Source
Evidently - posted In plain text.

Appreciated.


RE: File Merger Open Source - ENCRYP73D_GH05T - 12-23-2021

(12-23-2021, 01:34 AM)mothered Wrote:
Quote:Open Source
Evidently - posted In plain text.

Appreciated.


would it be better to just post a file link instead ?


RE: File Merger Open Source - mothered - 12-23-2021

(12-23-2021, 02:29 AM)ENCRYP73D_GH05T Wrote: would it be better to just post a file link instead ?
It's much of a muchness, so It's totally up to you.