Hey Monks,
I am a newb trying to figure out how I can append text files of the same name in different directories. Specifically, I have a directory with about 5000 subdirectories. Each subdirectory contains 500 text files where the name of the file is (potentially) non-unique. That is, there may be a file called name.txt in folders 000, 100, 940, and 1000.
I would like to find all instances where the file name is non-unique and APPEND them (e.g., append name.txt in folders 000, 100, 940, and 1000 above). The individual files can be deleted and the new appended file can be placed in any of the originating folders (i.e., 000, 100, 940, or 1000.)
Hopefully I have made myself clear :) I am using Strawberry Perl on Windows 10 64bit
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.