Welcome to %s forums

BrainModular Users Forum

Login Register

Create folder via the script "File Write Text File"

I need help on a Patch
Post Reply
creal
Member
Posts: 96
Contact:

Create folder via the script "File Write Text File"

Unread post by creal » 16 Feb 2021, 19:15

Hello,

When I use the module "File Write Text File" (it's a native script), I connect the "folder" inlet to a custom path name which is "dynamic" (it depends on the date). But I noticed that since the folder does not exist, the script cannot create a text file accordingly.

Is there a way to create the right folder at the right path (defined by the "folder" inlet) before creating the text file, please?

By the way, I take advantage of this thread to ask you if there is a way to enter a simple "space" character in a concat string inlet? (in the meantime I use an underscore character but it's not convenient). More generally, out of curiosity, what about other Unicode characters?

Thanks,

creal.

User avatar
senso
Site Admin
Posts: 4424
Location: France
Contact:

Unread post by senso » 17 Feb 2021, 10:16

hello,
you can use the procedure

Code: Select all

procedure CreateDir(dir:String);
to create a directory as referenced in https://www.brainmodular.com/manuals/hh4/en/scripting

The best way to have a 'space' in the concat module is to connect a constant module with the value 32. It's the ascii code for 'space'.
senso

creal
Member
Posts: 96
Contact:

Unread post by creal » 18 Feb 2021, 16:14

Hello,

thank you very much.

I tested some things with this procedure. For the moment, it didn't find how to add it to the current code. But I don't give up.

Excellent for the ASCII characters. It works like a charm.

creal.

Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests