Windows Logfile Archival Script

(Moran, Craig M (BAH)) #1

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


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
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\"
system(ZIP, “-m”, Archive, Dir[".log”])

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


-----Original Message-----
From: []

Nobu Nakada