File Modification Monitor

Discussion in 'Ruby' started by Travis Gassmann, Dec 14, 2007.

  1. Hello,

    I am new to ruby. I have a thrid party application that stores
    configuration settings in an ASCII/TEXT file. I need to map each
    function within the application to what lines it modifies in the text
    file. Every time I save the session, it creates a *.bak_YYMMDDHHmmss of
    the previous version of the file.

    I am looking to develop a simple script that I would loop through a
    directory and then compare the oldest *.bak_YYMMDDHHmmss with the next
    newest *.bak_YYMMDDHHmmss, until it reached the newest file. The script
    would append the differences to a text file.

    A nice to have is a start and stop funcation, where I could have it
    watch a directory and when ever a new *.bak_YYMMDDHHmmss file appears it
    will compare the files.

    I am looking for resoucres on how to program this script.

    Thanks
    jlimited
    --
    Posted via http://www.ruby-forum.com/.
     
    Travis Gassmann, Dec 14, 2007
    #1
    1. Advertising

  2. On 14 Dec 2007, at 23:06, Travis Gassmann wrote:
    > A nice to have is a start and stop funcation, where I could have it
    > watch a directory and when ever a new *.bak_YYMMDDHHmmss file
    > appears it
    > will compare the files.
    >
    > I am looking for resoucres on how to program this script.


    You might Autotest's code instructive. It watches a directory (of
    test files) and triggers whenever it spots a change.

    http://www.zenspider.com/ZSS/Products/ZenTest/

    For file comparison diff-lcs should be more than enough:

    http://raa.ruby-lang.org/project/diff-lcs/

    Regards,
    Andy Stewart


    -------
    http://airbladesoftware.com
     
    Andrew Stewart, Dec 17, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andy Fish
    Replies:
    0
    Views:
    634
    Andy Fish
    Jul 20, 2004
  2. Manuel Bastioni

    Get the date of last modification of a file

    Manuel Bastioni, Sep 8, 2003, in forum: Python
    Replies:
    6
    Views:
    2,080
    Manuel Bastioni
    Sep 9, 2003
  3. Replies:
    0
    Views:
    284
  4. Replies:
    3
    Views:
    277
    Bengt Richter
    Jan 25, 2005
  5. ScottZ
    Replies:
    2
    Views:
    392
    Jorgen Grahn
    Nov 2, 2008
Loading...

Share This Page