We'd like to remind Forumites to please avoid political debate on the Forum... Read More »
We're aware that some users are experiencing technical issues which the team are working to resolve. See the Community Noticeboard for more info. Thank you for your patience.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
Create/List empty folders, but not the entire tree
Options

KingL2
Posts: 88 Forumite

in Techie Stuff
I can create a set of empty directories that mirrors all the features on a existing tree (but intentionally excludes the actual files contained therein)
https://www.winhelponline.com/blog/how-to-copy-folder-structure-without-copying-files/
I can also create a list of the Path Statements of all the directories/sub-directories (intentionally excluding the files)
https://www.karenware.com/powertools/karens-directory-printer
https://print-folders.com/
..but I was wondering - is there a way to do those two things }(1) create empty directories and (2) list names/paths of folders (for folders only, not files)} but LIMITING THE SCOPE TO ONLY INCLUDE THE FIRST (or, say, FIRST&SECOND) levels of nesting/hierarchy/indentation?
For example, only returning folders that are in Subdirectory Levels 1&2, not SubDirectory Level 3

The solution would
-Preferably support UTF characters
-Preferably preserve the Creation Date of the original folders
-Windows 10 Home.
TA
0
Comments
-
will robocopy with the LEV parameter do what you want?
https://superuser.com/questions/995054/how-to-copy-all-folders-at-a-certain-level-but-no-files-or-subfolder
1 -
Yes, that does it, thanks. It seems that you need to add an extra "/copyall /dcopy:T " to preserve the Created Dates.
Right after I posted, I thought that I could just copy _everything_ ; dump the Path Statements into Excel ; then use a formula to count the number of backslashes and make a Rmdir statement if the Count>X. But this is easier.
0 -
KingL2 said:
Yes, that does it, thanks. It seems that you need to add an extra "/copyall /dcopy:T " to preserve the Created Dates.
Right after I posted, I thought that I could just copy _everything_ ; dump the Path Statements into Excel ; then use a formula to count the number of backslashes and make a Rmdir statement if the Count>X.
http://www.filedropper.com/howtodeleteheavily-nestedfolderstemplateuseexcel
0
Confirm your email address to Create Threads and Reply

Categories
- All Categories
- 350.8K Banking & Borrowing
- 253.1K Reduce Debt & Boost Income
- 453.5K Spending & Discounts
- 243.8K Work, Benefits & Business
- 598.7K Mortgages, Homes & Bills
- 176.8K Life & Family
- 257.1K Travel & Transport
- 1.5M Hobbies & Leisure
- 16.1K Discuss & Feedback
- 37.6K Read-Only Boards