I'm running ubuntu linux on an office network with mostly windows
machines. I have a shared network folder that I can access with samba
as:
smb://hostname/shared
I'm trying to write a script that will read the contents of that shared
folder, but can't access it using the above address. I tried to print
the content:
Dir.entries('smb://hostname/shared').each { |e| puts e }
But obviously got a no such directory error. I know this isn't the way
to go, but I can't figure out how to read that location.
From the windows clients, Dir["\\\\server\\share\\*"]
From the samb server, just use the actual directory that's mounted.
For other nix hosts, I would setup nfs mount points
···
On Feb 17, 2009, at 2:26 AM, sa 125 <s_ayalon@hotmail.com> wrote:
I'm running ubuntu linux on an office network with mostly windows
machines. I have a shared network folder that I can access with samba
as:
smb://hostname/shared
I'm trying to write a script that will read the contents of that shared
folder, but can't access it using the above address. I tried to print
the content:
Dir.entries('smb://hostname/shared').each { |e| puts e }
But obviously got a no such directory error. I know this isn't the way
to go, but I can't figure out how to read that location.
it won't answer the .each method as you would like but may still provide the
functionnalities you are looking for.
···
2009/2/17 List.rb <list.rb@gmail.com>
On Feb 17, 2009, at 2:26 AM, sa 125 <s_ayalon@hotmail.com> wrote:
I'm running ubuntu linux on an office network with mostly windows
machines. I have a shared network folder that I can access with samba
as:
smb://hostname/shared
I'm trying to write a script that will read the contents of that shared
folder, but can't access it using the above address. I tried to print
the content:
Dir.entries('smb://hostname/shared').each { |e| puts e }
But obviously got a no such directory error. I know this isn't the way
to go, but I can't figure out how to read that location.