Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I copy files with special characters in their names with Perl's File::Copy?
    primarykey
    data
    text
    <p>I am trying to copy all files in one location to a different location and am using the <code>File::Copy</code> module and <code>copy</code> command from that, but now the issue I am facing is that I have file whose name has <code>special character</code> whose ascii value is <code>&amp;#253</code> but in unix file system it is stored as <code>?</code> and so my question is that will <code>copy or move command</code> 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 ?</p> <p><strong>Note:</strong> I cannot create file with special characters in unix because special characters are replaced with <code>?</code> and I cannot do so in Windows because on Windows Special Characters are replaced with the Encoded value as in my case of <code>&amp;#253</code> ?</p> <pre><code>my $folderpath = 'the_path'; open my $IN, '&lt;', 'path/to/infile'; my $total; while (&lt;$IN&gt;) { chomp; my $size = -s "$folderpath/$_"; print "$_ =&gt; $size\n"; $total += $size; } print "Total =&gt; $total\n"; </code></pre> <p>Courtesy: <a href="https://stackoverflow.com/users/447771/rickf">RickF</a> <a href="https://stackoverflow.com/questions/3746552/file-manipulation-scripting-question/3753986#3753986">Answer</a></p> <p>Any suggesion would be highly appreciated. </p> <p><strong>Reference Question</strong> : <a href="https://stackoverflow.com/questions/3761218/perl-file-handling-question">Perl File Handling Question</a> </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload