Windows Logfile Archival Script

Oh, now this is good! This is the kind of input for which I was looking.
Thanks again, Nobu. Great tip.
Craig

Hi,

At Mon, 16 Feb 2004 23:15:36 +0900,
Moran, Craig M (BAH) wrote in [ruby-talk:92981]:

I didn’t use a batch file because I like Ruby more. :wink: Also, this is
just
a snippet from a much bigger program I wrote that’s a bit over 1000 lines.
Is it true that I would not have to use ftools? I though it was necessary
for Dir.chdir. I could easily be wrong since I’m a n00b. Thanks for the
input, Nobu.

At least, you wouldn’t need to iterate for each files in ruby,
many zip tools accept multiple files at once.

ZIP = “/Program Files/WinZip/WZZIP.EXE”
Archive = “C:\Logfiles\Archived.zip”
system(ZIP, “-m”, Archive, Dir[".log"])

And Dir.chdir is a builtin method, which calls the underlying
system call.

···

-----Original Message-----
From: nobu.nokada@softhome.net [mailto:nobu.nokada@softhome.net]


Nobu Nakada