tags:

views:

15

answers:

2

Not sure what i'm missing: I'm trying to access a unc share via irb on a Windows 2k8 machine:

irb(main):016:0> Dir.entries('\\server\share') Errno::ENOENT: No such file or directory - \server\share

irb(main):017:0> Dir.entries('\\192.168.10.1\share') Errno::ENOENT: No such file or directory - \192.168.10.1\share

Any hints? Sven

A: 

Looks like you're missing the trailing slash. Try '\\server\share\'

It's similar to the root directory of a Windows drive. That's C:\, not C:

MSalters
IRB doesn't seem to recognize the string termination this way...
Sven
Doesn't work either when doubling the backslashes: irb(main):021:0> Dir.entries('\\\\server\\share\\') Errno::ENOENT: No such file or directory - \\server\share\
Sven
A: 

Try to escape '\' with another '\'

Dir.entries('\\\\192.168.10.1\\share')

ILog
Oh lord. I had a typo in my path... However, it works with double backslashes. Thanks everyone...
Sven