http://qs321.pair.com?node_id=213844

/dev/trash has asked for the wisdom of the Perl Monks concerning the following question:

Right now I have this snippet of code to backup my Eudora Mailboxes to a network drive.
copy($_,'z:/mail_test') foreach glob 'D:/EudoraPro/*.mbx'; copy($_,'z:/mail_test') foreach glob 'D:/EudoraPro/*.toc';
It works great but I'd like to automate it so that when I close Eudora, the files get copied automatically. Will Win32::OLE interact with Eudora?

Replies are listed 'Best First'.
Re: Perl and Eudora
by dmmiller2k (Chaplain) on Nov 19, 2002 at 01:29 UTC

    You could write a wrapper script, e.g.,

    system("D:/EudoraPro/Eudora.exe"); copy($_,'z:/mail_test') foreach glob 'D:/EudoraPro/*.mbx'; copy($_,'z:/mail_test') foreach glob 'D:/EudoraPro/*.toc';

    Then, create a shortcut for the command, perl.exe eudorawrapper.pl and use THAT for starting Eudora.

    dmm

    If you GIVE a man a fish you feed him for a day
    But,
    TEACH him to fish and you feed him for a lifetime
      That doesn't work. The files get copied and everything but Eudora is not starting.
        If your on windows 2000 or Xp you can add your back up code as a scheduled task, will that work for you?