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
5 posts
• Page 1 of 1
Make a File Directory
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
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
-
aronb - Posts: 154
- Joined: Sun Apr 17, 2011 3:08 am
- Location: Florida, USA
Re: Make a File Directory
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...
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...
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Make a File Directory
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 !
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: 1571
- Joined: Thu Mar 08, 2012 7:58 pm
Re: Make a File Directory
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...
-
wlangfor@uoguelph.ca - Posts: 912
- Joined: Tue Apr 03, 2018 5:50 pm
- Location: North Bay, Ontario, Canada
Re: Make a File Directory
Very nice!!!
Thank you very much Trog
I figured there was something in Ruby... all my searches came back with using GEMS, which of course we can't really use easily
Aron
Thank you very much Trog
I figured there was something in Ruby... all my searches came back with using GEMS, which of course we can't really use easily
Aron
-
aronb - Posts: 154
- Joined: Sun Apr 17, 2011 3:08 am
- Location: Florida, USA
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 29 guests