I see you are under winz OS. I found an ancient (13 years old ?) program by Jenda that do something very similar.

I would post the link if i have found it at monastery, but seem i connot find it. So i post directly the code.

I hope Jenda will not be hurted by this.

### original code by Jenda as found at http://www.perlmonks.org/?node_ +id=105128 #perl -w # watch_dirs.pl use strict; #use G; use File::Copy; use Win32::IPC qw(wait_any); use Win32::ChangeNotify; use Win32::AbsPath qw(Relative2Absolute); use Win32::FileOp qw(:DIALOGS); use vars qw($VERSION $path @paths $i @notify @data $file $pathnum); $VERSION = "1.0"; if (@ARGV) { @paths = @ARGV; Relative2Absolute @paths; foreach (@paths) { die "Ussage: watch_dirs.pl [directory ...]\n\t\tversion $VERSI +ON by Jenda.Krynicky.cz (c) 2001\n" unless -d $_; } } else { while (1) { $path = BrowseForFolder "Watch directory for changes\nClick [C +ancel] to finish directory selection" , CSIDL_DRIVES, BIF_RETURNONLYF +SDIRS or last; push @paths, $path; } die "OK. No directory selected. I'm quiting.\n" unless @paths; } print "Watching directories:\n"; for ($i=0;$i<=$#paths;$i++) { $path = $paths[$i]; print "\t$path\n"; mkdir $path.'\\_b_a_c_k_u_p', 0777; opendir DIR, $path; while ($file = readdir DIR) { next if -d $path.'\\'.$file; $data[$i]->{$file} = (stat($path.'\\'.$file))[9]; } closedir DIR; push @notify, Win32::ChangeNotify->new($path,0,"LAST_WRITE SIZE FI +LE_NAME"); }; print "\n"; while (1) { $pathnum = wait_any(@notify) or die "Can't monitor the directory: +$!\n"; $pathnum--; # arrays always start from zero not one my $pathdata = $data[$pathnum]; my $path = $paths[$pathnum]; opendir DIR, $path; while ($file = readdir DIR) { next if -d "$path\\$file"; my $time = (stat("$path\\$file"))[9]; if ($pathdata->{$file} != $time) { print "$path\\$file has changed!\n"; my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);$mon++;$year += 1900; my $timestr = sprintf '%04d%02d%02d-%02d%02d%02d',$year,$m +on,$mday,$hour,$min,$sec; copy "$path\\$file" => "$path\\_b_a_c_k_u_p\\$file.$timest +r"; $pathdata->{$file} = $time; } } closedir DIR; $notify[$pathnum]->reset; } =pod PerlApp perlapp watch_dirs.pl -f -c -x "-info=fileversion=1.0;productversion=1 +.0;internalname=watch_dirs.pl 1.0;originalfilename=watch_dirs.exe;com +panyname=Jenda Krynicky;productname=watch_dirs;legaltrademarks=Jenda. +Krynicky.cz;filedescription=Watch dirs for changes and make backup;le +galcopyright=Jenda.Krynicky.cz" =cut
HtH
L*

UPDATE:i was seraching in the wrong place: the program is at his homesite!

L*
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

In reply to Re: Monitor directory for new files and copy only new files to another directory by Discipulus
in thread Monitor directory for new files and copy only new files to another directory by JasonVoorheez

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.