Thanks for the tip on the prototype - perl is new to me. The ()'s got added out of habit.

I'm not creating the junctions, windows did. The way I found out what they were was a DIR in the correct directory - someone pointed out in the chatterbox that I had done my initial DIR in the wrong directory, so here is the right one

C:\Users\Joel\Documents>dir /ad Volume in drive C has no label. Volume Serial Number is DE8B-53F2 Directory of C:\Users\Joel\Documents 02/07/2011 03:36 PM <DIR> . 02/07/2011 03:36 PM <DIR> .. 09/14/2010 05:56 AM <DIR> Archive 12/24/2010 07:24 PM <DIR> Misc 12/11/2009 06:42 AM <JUNCTION> My Music [C:\Users\Joel\Music] 12/11/2009 06:42 AM <JUNCTION> My Pictures [C:\Users\Joel\Pict +ures] 12/11/2009 06:42 AM <JUNCTION> My Videos [C:\Users\Joel\Videos +] 09/04/2010 05:52 AM <DIR> WORD 0 File(s) 0 bytes 25 Dir(s) 280,587,014,144 bytes free C:\Users\Joel\Documents>
As for the clone, I had a WD drive going bad, got a new one under warranty (WD treated me right), and used their software "Acronis True Image" to clone it which copies sector by sector. I did have a number of unreadable sectors but am now booting off the new drive. It is difficult to know which files are on a particular sector and the clone log didn't list enough info anyway so I just wanted to see if there were any missing files before erasing the old drive and shipping it back.

I just ran this code

my $x = 'c:/users/joel/documents'; opendir(my $dh, $x) || die; while(readdir $dh) { if (-d "$x/$_") { print "dir $_\n";} if (-l "$x/$_") { print "lnk $_\n";} } closedir $dh;
and get this:
dir . dir .. dir Archive dir Misc dir My Music dir My Pictures dir My Videos dir WORD
from above see that the "My x" are junctions (or links?) Shouldn't they get caught by the -d/-l test?

In reply to Re^2: File::Find giving unexpected results under windows by Joel
in thread File::Find giving unexpected results under windows by Joel

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.