How to merge all the files in a directory in to one file - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: How to merge all the files in a directory in to one file (/thread-31412.html) |
How to merge all the files in a directory in to one file - sutra - Dec-09-2020 I have a bunch of .log in the directory /home/vs/vs_work2/Chi_DEPB/ I want to merge them into a single file. output_file.txt : Contents, all the merged files. RE: How to merge all the files in a directory in to one file - Larz60+ - Dec-09-2020 Please show your attempted code, any error tracebacks, and where you think the problem lies. RE: How to merge all the files in a directory in to one file - sutra - Dec-09-2020 (Dec-09-2020, 09:04 PM)Larz60+ Wrote: Please show your attempted code, any error tracebacks, and where you think the problem lies. This is my attempted code but. Quote:cat /home/vs/vs_work2/Chi_DEPB/*.log > output_file.txt RE: How to merge all the files in a directory in to one file - sutra - Dec-10-2020 (Dec-09-2020, 09:04 PM)Larz60+ Wrote: Please show your attempted code, any error tracebacks, and where you think the problem lies. in this thread, I have explained the complete question https://python-forum.io/Thread-Merging-all-file-name-log-s-files-from-directory-to-one-and-search-%E2%80%9CPerformanceINFO |