ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

Delete specific folders in a directory hierarchy tree

(1/1)

nkormanik:
I've been searching for hours for an answer.  Such a simple thing.  Huge jumble of partial answers....

Given:  Large directory tree structure, folders with files, maybe some empty folders.

Challenge:  Move recursively throughout tree.  Delete all folders in entire tree that has in name "xyz".

There might be one such folder.  There might be one hundred.

Any thoughts greatly appreciated.

Nicholas Kormanik

(thanks @publicdomain, and others, for much help on many challenges)

Nod5:
Easy to do with Everything https://www.voidtools.com/
For example if the start folder of the tree is "C:\tree" then you can list all its subfolders with "xyz" in the subfolder name with this search line. (The option "match path" in the menu "Search" must also be enabled.)

--- ---"C:\tree\" xyz folder:You can then select the subfolders in the results list and delete them, just like in File Explorer. Doing so will also delete any files within those subfolders, of course. If the subfolder name fragment you search for has spaces then quote enclose it e.g. "abc def".



This basic example can be modified for more complex searches, for example with regex pattern matching instead of a plain string.

publicdomain:
Given:  Large directory tree structure, folders with files, maybe some empty folders.

Challenge:  Move recursively throughout tree.  Delete all folders in entire tree that has in name "xyz".

There might be one such folder.  There might be one hundred.-nkormanik (November 23, 2021, 12:09 AM)
--- End quote ---

Hi Nick! nkTree coming:



Supports long paths via Win32 API library: 32000+ characters.

https://github.com/publicdomain/nktree

(I'm finally home & coding for the Public Domain :Thmbsup: November release -just some days to go)

(thanks @publicdomain Vic, and others, for much help on many challenges)-nkormanik (November 23, 2021, 12:09 AM)
--- End quote ---

Having multiple community support is the best indeed!

(From my humble position, rest assured it's my pleasure, AMIGO :) )

publicdomain:
Hi Nick! nkTree coming
-publicdomain (November 23, 2021, 10:42 PM)
--- End quote ---

It's released: nkTree - GUI for actions on a directory tree (v0.1.0)

Enjoy!
:Thmbsup:
Vic

Navigation

[0] Message Index

Go to full version