I am trying to run the following code on Winxp machine. From what I am seeing in the docs it should work but doesn't.
use File::Xcopy;
my $obj = File::Xcopy->new;
# copy all the files with .txt extension if they exists in /tgt/dir
$obj->xcopy('c:/TEMP', 'c:/temp2', '\.txt$');
The output is as follows. I don't see what I have wrong so any help is greatly appreciated. Thanks in advance
# Xcopy Log Output
# Date: Thu Dec 16 12:15:52 2004
# Input parameters:
# From dir: /temp2
# To dir: /TEMP
# File Pat: \.txt$
# Action : copy
# File statistics: category: count: pct: total size
# The Same size and time: 1: 20.00%: 0 Bytes
# Different size or time: 1: 20.00%: 0 Bytes
# File does not exist in FROM folder: : 0.00%:
# File is older or the same: : 0.00%: 0 Bytes
# File is newer and its size bigger: 1: 20.00%: 0 Bytes
# File is newer and its size smaller: : 0.00%:
# File does not exist in TO folder: 4: 80.00%: 568.454KB
# -----------------------------------: ---------:-------:----------
# Totals: 5:100.00%: 568.454KB
#
# File size: max 581694 min 0 diff 6D17:34:54
# File time: max 20041216.121230 min 19800101.000000 diff 9116D12:12:30
#
#action| from_time| to_time| tmdiff| from_size| to_size| szdiff|file_name
OW|20041216.121230|20041216.115402| 18:28| 0 Bytes| 0 Bytes| 0 Bytes|./.
no action|19800101.000000|19800101.000000| 00| 0 Bytes| 0 Bytes| 0 Bytes|./..
NA| |20041216.113115| | | 0 Bytes| |./File-Xcopy-0.11
NA| |20041124.065053| | | 568.061KB| |./Text.exe
NA| |20041124.065026| | | 14 Bytes| |./Text.txt
NA| |20041209.131530| | | 389 Bytes| |./test.pl
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.