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
how to create a folder with Ruby
how to create a folder with Ruby
Hi,
it's been a while.
But does anybody knows how to create a folder?
To get to a folder is easy but to create one?
For example a user puts in a name, then i want to create a folder in the My Documents folder.
I tried something like this:
begin
Dir::mkdir(directory_name)
rescue
puts "the directory already exists"
end
but....
anyone ?
thanks a lot for your help
it's been a while.
But does anybody knows how to create a folder?
To get to a folder is easy but to create one?
For example a user puts in a name, then i want to create a folder in the My Documents folder.
I tried something like this:
begin
Dir::mkdir(directory_name)
rescue
puts "the directory already exists"
end
but....
anyone ?
thanks a lot for your help
Re: how to create a folder with Ruby
found a solution that fits probably good enough
viewtopic.php?f=2&t=1354&p=5002&hilit=create+folder#p5002
thanks to Trog
viewtopic.php?f=2&t=1354&p=5002&hilit=create+folder#p5002
thanks to Trog
Re: how to create a folder with Ruby
Code: Select all
directory_name = "name"
Dir.mkdir(directory_name) unless File.exists?(directory_name)Re: how to create a folder with Ruby
Thanks Tronic !
I will give that a try.
I will give that a try.