Hi again,
I'm sorry- I don't want to ask anyone to have to hold my hand through the whole thing, but I've tried the suggested code, and I can't get it to work. I must be doing something wrong.
If all the text files I'm combining are in the directory "C:\Documen ts and Settings\pd\Des ktop\Pythontest ", what exactly should the full code look like?
Thanks so much again!
User Profile
Collapse
-
Thanks a ton! This will hopefully make my life a lot easier. So if I understand correctly, I will tack on micmast's code to the bottom of jlm699's code and modify where necessary. I will try this out ASAP.
Thanks again!Leave a comment:
-
PDSTAR started a topic How can I combine a directory of .txt files into one AND insert their filenamesin PythonHow can I combine a directory of .txt files into one AND insert their filenames
Hello,
Any help would be much appreciated. I have a directory of ~2000 tab delimited .txt files. I would like to combine all these files (append to the last blank row) into a master file. The one catch is, I need the filename from which the data is drawn to be the first item in every row of the master file. For example:
I don't know how to insert tabs into this message, so I'll insert "|" where a tab would...
No activity results to display
Show More
Leave a comment: