From: Gaius Bonus Date: 2006-11-30T23:04:39+09:00 Subject: WMI usage in Ruby to get file size, beginners question Hello, sorry if the question is so stupid as I assume. I try to get the size of a file by using wmi (because I want to collect the size of various files on Microsoft boxes all over the network later). I try: require 'win32ole' mgmt = WIN32OLE.connect("winmgmts:\\\\.") fiNa=mgmt.ExecQuery("SELECT * FROM CIM_DataFile WHERE Name = 'c:\\test.txt'") fiNa.each {|fn| puts fn.FileSize.to_s} I do not get any error message but also no output. So I think I do something wrong with the wmi handling. I messed arround the whole day and now I run out of ideas. It would be great if you could help me. Thanks in advance, bye -- Posted via http://www.ruby-forum.com/.