GP SoftwareTwitter
Opus FAQsManualCommandsObjects

How do I create a number of folders from txt file?

Hi all,

Is it possible to create a number of folders from txt file?

I continually have a bunch of folders I need to duplicate to another location but without the folder contents - just the folder names.

Another twist is sometimes I need to rename all the folder names by replacing all the spaces to underscores

The way I do it now is copy all the folder names to the clipboard and create a txt file
Manually add a comma (,) to the end of each line
Copy to clipboard from the txt file about 5 or 6 names and then use create new folder and paste into that box

Hopefully someone here knows of an easier and quicker way to make all the folders at once from the txt file or clipboard

TIA

David (vengab)

See Recreate Empty Directory Structure for creating the directories.

For converting spaces to underlines, use a button which runs this command:

@NODESELECT Rename PATTERN=" " TO="_" FINDREP

(The paste file list button may also be of use and is a more literal answer to your question of how create things from a list in the clipboard. I doubt you'll want to use the clipboard when you can just select the folders you want duplicated, though. You'd also have to modify it to create directories instead of files.)

Thanks Leo for offering your help but...

I have spent the last 2 hours trying to figure out how to implement the info in the "Recreate Empty Directory Structure" page and have gotten nowhere :frowning:

What I do have now in the toolbar is the word 'Command' with an empty box next to it. I can not get rid of it either

Can please tell me step-by-step what I need to do?

Sorry but I am relatively new to diropus

Have a look at the Toolbar editing tutorial: Toolbar Editing (video tutorial)

Thanks Jon :smiley:

Things are a little different in the new version but it easy enough to figure out what to do

And thanks to you too Leo :smiley:
You have made my life so much easier now :slight_smile:

I have this button here which works for me:

@echo off for /f "tokens=*" %%a in ('type "D:\test folder\make folder from this textfile.txt"') do ( md "%%a" )

You need to create a folder in the Path D e.g. which is called "test folder" and a textfile within this folder with the name of each folder (one folder name per line)