I am trying to copy all files in one location to a different location and am using the File::Copy
module and copy
command from that, but now the issue I am facing is that I have file whose name has special character
whose ascii value is ý
but in unix file system it is stored as ?
and so my question is that will copy or move command
consider this files with special characters while copying or moving to another location or not,
if now then what would be an possible work around for this ?
Note: I cannot create file with special characters in unix because special characters are replaced with ?
and I cannot do so in Windows because on Windows Special Characters are replaced with the Encoded value as in my case of ý
?
my $folderpath = 'the_path';
open my $IN, '<', 'path/to/infile';
my $total;
while (<$IN>) {
chomp;
my $size = -s "$folderpath/$_";
print "$_ => $size\n";
$total += $size;
}
print "Total => $total\n";
Any suggesion would be highly appreciated.
Reference Question : Perl File Handling Question