Obtaining the Archive Attribute of a File on Windows Systems

Is it possible to check the archive attribute of Windows files using
Ruby? Or, even better, is it possible to get a list of files that have
active archive bits to then be able to copy or move to a backup
location?

Any ideas or suggestions would be much appreciated.

···


DeLynn Berry
delynnb@mac.com

Hi,

win32/stat.rb (1.03 KB)

···

At Mon, 31 Mar 2003 08:51:58 +0900, DeLynn Berry wrote:

Is it possible to check the archive attribute of Windows files using
Ruby? Or, even better, is it possible to get a list of files that have
active archive bits to then be able to copy or move to a backup
location?

Directly, no. Ruby’s file system model bases on UNIX’s one.
Furthermore, MSVCRT maps attributes but hides some bits
including the archive bit.

Try this with Win32Module
http://www.moonwolf.com/ruby/archive/win32module_20001226b.tar.bz2