I want to create several hundreds (empty) folders & subfolders (without loosing the directory > subdirectory order) from a text file (each line one folder name) or any other method. How can I do it?
By copying folders excluding all files would be another solution if I know how to do this.
Create Folders From A Text File or any other method.
Moderators: white, Hacker, petermad, Stefan2
Re: Create Folders From A Text File / Copy FoldersOnly FolderStructure
Just utilize a script tool from your OS system (Batch bat cmd / PowerShell) or AutoHotkey/PowerPro, parsing the list and create the folders for you.
TC can aid you by providing parameter (current selected listfile / current folder / target folder) for to set the script params on the fly from e.g. an button.
Edit according to your Edit:
- Select the top most folder and copy with F5.
- In "Only files of this type"- box enter a file mask like *.txt to copy text files only
-- - or any non-existing thing like "DoNotCopyAnyFile" for to not copy any file.
Find me: Copy FoldersOnly FolderStructure NonExistentFileType NonExistentFileExtension F5Folders F5Files OFOTT NoFiles
Re: Create Folders From A Text File / Copy FoldersOnly FolderStructure
"Only files of this type" worked, also it's very simple. I didn't aware of that field. Thank you very much.Stefan2 wrote: ↑2019-12-06, 10:03 UTC
Just utilize a script tool from your OS system (Batch bat cmd / PowerShell) or AutoHotkey/PowerPro, parsing the list and create the folders for you.
TC can aid you by providing parameter (current selected listfile / current folder / target folder) for to set the script params on the fly from e.g. an button.
Edit according to your Edit:- Select the top most folder and copy with F5.
- In "Only files of this type"- box enter a file mask like *.txt to copy text files only
-- - or any non-existing thing like "DoNotCopyAnyFile" for to not copy any file.
Find me: Copy FoldersOnly FolderStructure NonExistentFileType NonExistentFileExtension F5Folders F5Files OFOTT NoFiles
Re: Create Folders From A Text File or any other method.
Assuming the list of folders is in newfolders.txt:
CMD Script:
Code: Select all
for /f "usebackq delims=" %%x in ("newfolders.txt") do md "%x"
Code: Select all
gc .\newfolders.txt | % {md "$_.FullName" -whatif }
FWIW, I use :
Code: Select all
xcopy /I /T /E "c:\SOURCE\this folder" "X:\TARGET\this folder"
EDIT:
Missed your reply; ignore my message ...