Create Folders From A Text File or any other method.

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
drbeat
Junior Member
Junior Member
Posts: 57
Joined: 2017-01-01, 01:13 UTC

Create Folders From A Text File or any other method.

Post by *drbeat »

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.
User avatar
Stefan2
Power Member
Power Member
Posts: 4157
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Create Folders From A Text File / Copy FoldersOnly FolderStructure

Post by *Stefan2 »

drbeat wrote: 2019-12-06, 09:53 UTC I want to create several hundreds (empty) folders from a text file (each line one folder name) How can I do it?

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:
drbeat wrote: 2019-12-06, 09:53 UTC By copying folders excluding all files would be another solution if I know how to do this.
- 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
drbeat
Junior Member
Junior Member
Posts: 57
Joined: 2017-01-01, 01:13 UTC

Re: Create Folders From A Text File / Copy FoldersOnly FolderStructure

Post by *drbeat »

Stefan2 wrote: 2019-12-06, 10:03 UTC
drbeat wrote: 2019-12-06, 09:53 UTC I want to create several hundreds (empty) folders from a text file (each line one folder name) How can I do it?

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:
drbeat wrote: 2019-12-06, 09:53 UTC By copying folders excluding all files would be another solution if I know how to do this.
- 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
"Only files of this type" worked, also it's very simple. I didn't aware of that field. Thank you very much.
NotNull
Senior Member
Senior Member
Posts: 269
Joined: 2019-11-25, 20:43 UTC
Location: NL

Re: Create Folders From A Text File or any other method.

Post by *NotNull »

drbeat wrote: 2019-12-06, 10:30 UTC Just utilize a script tool from your OS system (Batch bat cmd / PowerShell)
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"
PowerShell:

Code: Select all

 gc .\newfolders.txt | % {md "$_.FullName" -whatif }
(remove the -whatif if test results look good)


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 ...
Post Reply