OOPS, the sample code was wrong. It should be...

puts File.stat('\\\\remoteMachineName\\Test\\Dir1').mtime

It still doesn't work, however.

FYI

Hayato Iriumi wrote:
> I was trying to get modified date/time for a remote directory and the 
> way you showed me worked only when I mapped the drive, so it's all OK, 
> but I just wanted to let the community know that it doesn't seem to work 
> if you specify the path like...
> 
> puts File.stat('\\\\remoteMachineName\\Test\\Dir1')
> 
> When I do it, I get Errno::ENOENT: No such file or directory -
> 
> Again, when I map the network folder, it works OK.
> 
> 
> Nobuyoshi Nakada wrote:
>> Hi,
>> 
>> At Wed, 22 Aug 2007 09:54:45 +0900,
>> Hayato Iriumi wrote in [ruby-talk:265729]:
>>> Hello, folks.
>>> I'm trying to find out a way to get "Date Modified" value for a
>>> directory on Windows. Is it possible to get the value from Ruby?
>> 
>> File.stat(".").mtime
>> File.mtime(".")

-- 
Posted via http://www.ruby-forum.com/.