Create/List empty folders, but not the entire tree
KingL2
Posts: 79
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
Categories
- All Categories
- 342.2K Banking & Borrowing
- 249.8K Reduce Debt & Boost Income
- 449.3K Spending & Discounts
- 234.4K Work, Benefits & Business
- 606.7K Mortgages, Homes & Bills
- 172.7K Life & Family
- 247.2K Travel & Transport
- 1.5M Hobbies & Leisure
- 15.8K Discuss & Feedback
- 15.1K Coronavirus Support Boards