Can I... Extract filenames for a specific filetype, but only one subdirectory deep
Posted: 27 Feb 2019 22:52
Hello,
I have a directory which I am using as my primary, but is itself a subdirectory, if that's relevant. I'll call this Level 1.
Contained in the Level 1 directory are approximately 320 subdirectories; I'll call this Level 2.
Each directory in Level 2 contains 4 more subdirectories (Level 3, naturally), some other files, and anywhere from 1 to 7 PDFs. What I'm after is the names of these PDFs. Plain text or CSV are both fine. I want to exclude the Level 3 subdirectories and the other files if at all possible.
The Level 3 directories also contain multiple PDFs each. I don't want these; as one Level 3 subdirectory is an archive of what was in Level 2 at one time, the PDF names will be similar, making it harder to exclude them manually. Likewise, some of the "other files" are .docs of the PDFs that have the same name.
I've tried the various reports, and the Tree Structure is closest to what I want in terms of formatting. If I check Include Subfolders, then I get the results of Level 3, and if I don't, then I would need to run the report on each of the ~320 folders. At that point I feel it would be more efficient to manually select the filenames that I want and copy those into my spreadsheet.
I'm not opposed to doing that, except that I might need to redo this in the future, so if it can be done programmatically, that would be preferable.
Thank you for your time and consideration.
I have a directory which I am using as my primary, but is itself a subdirectory, if that's relevant. I'll call this Level 1.
Contained in the Level 1 directory are approximately 320 subdirectories; I'll call this Level 2.
Each directory in Level 2 contains 4 more subdirectories (Level 3, naturally), some other files, and anywhere from 1 to 7 PDFs. What I'm after is the names of these PDFs. Plain text or CSV are both fine. I want to exclude the Level 3 subdirectories and the other files if at all possible.
The Level 3 directories also contain multiple PDFs each. I don't want these; as one Level 3 subdirectory is an archive of what was in Level 2 at one time, the PDF names will be similar, making it harder to exclude them manually. Likewise, some of the "other files" are .docs of the PDFs that have the same name.
I've tried the various reports, and the Tree Structure is closest to what I want in terms of formatting. If I check Include Subfolders, then I get the results of Level 3, and if I don't, then I would need to run the report on each of the ~320 folders. At that point I feel it would be more efficient to manually select the filenames that I want and copy those into my spreadsheet.
I'm not opposed to doing that, except that I might need to redo this in the future, so if it can be done programmatically, that would be preferable.
Thank you for your time and consideration.