Can I... Extract filenames for a specific filetype, but only one subdirectory deep

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Reason
Posts: 2
Joined: 27 Feb 2019 22:33

Can I... Extract filenames for a specific filetype, but only one subdirectory deep

Post by Reason »

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.

jupe
Posts: 2794
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Can I... Extract filenames for a specific filetype, but only one subdirectory deep

Post by jupe »

Well you can set the maximum searching depth like this, navigate to the closest parent to your pdfs then use something like this as address bar input:

?*.pdf /maxdepth=2 /f

You may need to adjust the depth value depending on where you set your root to search from, and then when you get the results you want you can select all, then just use this menu item (if you only want item names):

File | To Clipboard | Item Name(s) (Ctrl+Shift+P)

Reason
Posts: 2
Joined: 27 Feb 2019 22:33

Re: Can I... Extract filenames for a specific filetype, but only one subdirectory deep

Post by Reason »

Nice! I adjusted it to a depth of 1 and it worked perfectly! Thanks very much!

jupe
Posts: 2794
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Can I... Extract filenames for a specific filetype, but only one subdirectory deep

Post by jupe »

whoops, yes the 2 was a typo. :oops:

Post Reply