I looked into that module as well, but if I read it correctly, it did state that the developer was working on the EXCLUDE portion of it. So, in the mean time I went with the following code. If anybody has any other recommendations, where it can be portable, i would appreciate the feedback.
my $source = 'c:/win/data'; my $to_dir= 'c:/temp/DATA'; use File::Path; mkpath(${to_dir}) or die "mkdir '${to_dir}' failed: $!" if not -e $to_ +dir; open(FH,">${to_dir}/EXCLUDE.txt"); print FH ".lck\n"; close FH; my $xcopy = $ENV{'systemroot'} . '\\system32\\xcopy.exe'; my $exclude="${to_dir}/EXCLUDE.txt"; $exclude =~ s/\//\\/g; my $command = qq{("$xcopy" "$source" "$to_dir" /E /I /F /R /Y /EXCLUDE +:$exclude)}; print $command . "\n"; system($command); unlink $exclude;

In reply to Re^2: Copy files and subdirectories by g_speran
in thread Copy files and subdirectories by g_speran

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.