#### https://metacpan.org/pod/Win32API::File use Win32API::File qw'GetFileAttributes :FILE_ATTRIBUTE_'; sub isjunc { return GetFileAttributes($_[0]) & FILE_ATTRIBUTE_REPARSE_POINT } #### if ( -d ) { # junctions show up as TRUE for `-d` if( isjunc($File::Find::name) ) { # if it's a junction, don't bother creating checking destination directory existence, # and don't try to recurse into it $File::Find::prune = 1; printf ("[%s] %-12s'%s'\n", scalar(localtime), "JUNCTION:", $File::Find::name) if ($VERBOSE); return; } ... # go do the stuff I want to do if it's a real directory, and not a junction }