Welcome Guest

Pages: 1
Generating empty folders with names from a text file!
SnowdogPostSeptember 7, 2026, 18:42
Pro
Posts: 386
Registered:
March 15, 2022, 17:12
Normal topicGenerating empty folders with names from a text file!

Yes, another weird one.

I have a text file which is a list of tour dates. I'm currently in the process of copying each line from the list & pasting it in as the name of an empty folder.

And then I thought... Hmmm... I wonder!

What do you reckon? Is it possible?

Here's the list (& the directory I'm creating, so you can see what the desired result will look like). I can point Yate at an empty folder, so it wouldn't have to worry about the few that are already there, duplications or whatever.

Image
Image

2MR2PostSeptember 7, 2026, 18:51
Avatar photo
Administrator
Posts: 2494
Registered:
August 23, 2012, 19:27
Normal topicGenerating empty folders with names from a text file!

Reading a list of names from a file and creating empty folders in a supplied folder is easy.

However, once again I'm missing something. Your second screenshot seems to have something in parentheses appended to each name. Do I just use the names in the text file?

2MR2PostSeptember 7, 2026, 21:13
Avatar photo
Administrator
Posts: 2494
Registered:
August 23, 2012, 19:27
Normal topicGenerating empty folders with names from a text file!

I've created an action based on the assumption that the text file contains the actual names of the folders to be created.

Download the action at https://2manyrobots.com/actions/Create-Empty-Folders-from-Text-File.zip

The action is named: Create Empty Folders from Text File

You will be prompted for the text file and a root folder. The root folder is where the folders will be created.

Note if the folder already exists or if the text file contains duplicate names, nothing unexpected will happen.

Yate cannot create an empty folder without calling an external script. However, Yate creates all path components when writing a text file. In the action, an empty file named tmpfile.tmp will be written to trigger the folder creation. The file is then deleted.

The action warns you if a folder name contains any invalid characters. Typically : or / but it could be tabs, control characters, etc.

SnowdogPostSeptember 8, 2026, 18:26
Pro
Posts: 386
Registered:
March 15, 2022, 17:12
Normal topicGenerating empty folders with names from a text file!

Thanks so much. Sorry, been tied up all day. Yes, just the folder names in the text file. The extra stuff will vary & I'll have to add it manually. I'll give it a go & see what happens!

SnowdogPostSeptember 8, 2026, 18:35
Pro
Posts: 386
Registered:
March 15, 2022, 17:12
Normal topicGenerating empty folders with names from a text file!

Well, I got what I needed, with a little extra. Some weird stuff at the top. Not sure if it makes sense to you?

Nothing I can't tidy up, though, while I add all the extra info.

Thanks. Once again, you've saved me hours!
Image

2MR2PostSeptember 8, 2026, 19:17
Avatar photo
Administrator
Posts: 2494
Registered:
August 23, 2012, 19:27
Normal topicGenerating empty folders with names from a text file!

Hmm...some other the other folders have some weird items as well. There's two unknown for me, I don't have the text file and I don't know what the target filesystem is and how it handles things like accented characters. If you look in the middle, it's obvious that Québec was intended and not Qu\'e9bec. If you want to send me the text file (support@2manyrobots.com) and what the target system is ... I can have a look.

2MR2PostSeptember 11, 2026, 10:21
Avatar photo
Administrator
Posts: 2494
Registered:
August 23, 2012, 19:27
Normal topicGenerating empty folders with names from a text file!

The text file was an RTF file. The RTF encoding was causing the issues. I've updated the action at the same link to v2.0. It now strips RTF data and works as expected.

Pages: 1
Mingle Forum by Cartpauj | Version: 1.1.0beta | Page loaded in: 0.017 seconds.