in reply to File name is long to copy

I copied your directory set up, along with the filename, and ran your script on perl-5.12.0 on Windows 7 and it worked fine for me. I did add a couple of lines to check that both the file ($source) and the destination directory ($target) existed:
use strict; use warnings; use File::Copy; my $source="C:\\sandboxes\\source_backup\\source_backup\\source_develo +p\\source_folder\\source_part\\source_specific\\source_common\\rb_src +c_sourcedevelopfolderpartspe_Interfacessourcecommonspecific.h"; my $target="C:\\sandboxes\\target_backup\\target_backup\\target_develo +p\\generated\\_hnv_scan\\_source_develop\\source_folder\\source_part\ +\source_specific\\source_common"; print "OK 1\n" if -e $source; print "OK 2\n" if -d $target; copy($source,$target) or die "could not do: $!"; print ("done");
I got:
C:\_32\pscrpt>perl try.pl OK 1 OK 2 done C:\_32\pscrpt>
However, the first time I ran it, it failed because I had not named the $target directories correctly.
I had missed the underscores at the beginning of "_hnv_scan" and "_source_develop", and the script therefore produced:
C:\_32\pscrpt>perl try.pl OK 1 could not do: at try.pl line 10.
Please do check that both the $target directory and $source file do actually exist, as it seems to me that the most likely explanation of your issue is a typographical error.

Cheers,
Rob