Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

Make a File Directory

For general discussion related FlowStone

Make a File Directory

Postby aronb » Tue Jun 11, 2019 8:38 pm

Hi,

I have looked around a bit and cannot seem to find out how to make a file directory to store a text file in.

For example, I have a text file (test.txt)
I want to create a directory, then store the file...

I can can create the file and save it, I just can't figure out how to use Ruby or any module to make a directory to store the file in :?:

Maybe I've just been looking to long for the answer :?

Thanks, Aron
User avatar
aronb
 
Posts: 154
Joined: Sun Apr 17, 2011 3:08 am
Location: Florida, USA

Re: Make a File Directory

Postby trogluddite » Tue Jun 11, 2019 10:05 pm

Ruby is able to do this via it's Dir module, and it's also possible by using the "Shell Execute" primitive to send a Windows system command.

Here's a module that does it using Ruby, which I prefer because it's easier to define your own action if the folder creation fails. Note that the 'create_folder' routine calls itself recursively with each parent folder name in turn, so it will create all of the folders necessary for the complete path, however deeply they're nested...
create_folder.fsm
(1.26 KiB) Downloaded 792 times
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Make a File Directory

Postby RJHollins » Tue Jun 11, 2019 11:15 pm

Thanks TROG.

I've always used the PRIM FS modules for this deed.

But I got to say, it was one of the messier sections of the schematic [trying to keep connection path clean].

Seems it was always a challenge when transitioning out of FlowStone proper to the exported VST. But I did get
it working as needed. [what I needed was saving a TXT file into a dedicated FOLDER within an Audio Project Folder ... and have it Default to that [chosen] location.

I also used SPROG's technique of Saving parameters in a hidden PreSet Manager. Works nice.

Thanks again for the RUBY way !
RJHollins
 
Posts: 1568
Joined: Thu Mar 08, 2012 7:58 pm

Re: Make a File Directory

Postby wlangfor@uoguelph.ca » Wed Jun 12, 2019 5:54 pm

Thanks, that might come in handy

trogluddite wrote:Ruby is able to do this via it's Dir module, and it's also possible by using the "Shell Execute" primitive to send a Windows system command.

Here's a module that does it using Ruby, which I prefer because it's easier to define your own action if the folder creation fails. Note that the 'create_folder' routine calls itself recursively with each parent folder name in turn, so it will create all of the folders necessary for the complete path, however deeply they're nested...
create_folder.fsm
My youtube channel: DSPplug
My Websites: www.dspplug.com KVRaudio flowstone products
User avatar
wlangfor@uoguelph.ca
 
Posts: 912
Joined: Tue Apr 03, 2018 5:50 pm
Location: North Bay, Ontario, Canada

Re: Make a File Directory

Postby aronb » Wed Jun 12, 2019 7:05 pm

Very nice!!!

Thank you very much Trog :D

I figured there was something in Ruby... all my searches came back with using GEMS, which of course we can't really use easily :roll:

Aron
User avatar
aronb
 
Posts: 154
Joined: Sun Apr 17, 2011 3:08 am
Location: Florida, USA


Return to General

Who is online

Users browsing this forum: No registered users and 23 guests