Windows 7 64-bit, Ruby 1.9.3.

If I create a text file called "RDTlockfile.dat"

And in the same directory, a single line rb file:

system "attrib +h RDTlockfile.dat"

Running this file with Ruby's CUI interpreter hides the target file, but
running it as an rbw or with the GUI interpreter doesn't hide the file.

I have tried IO.popen and various other methods to hide this file but so
far have drawn a blank, the Win32API and dl approaches keep giving me
invalid methods or deprecation errors. It works fine using the console
Ruby, but I'm using Tk as a GUI so I don't want a console window to
appear. It looks like a bug, as I thought the same commands would work
with either interpreter.

Any ideas as to why this happens or how to get around it?

thanks,

Joe

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