while (defined($long_file_name = readdir(DIR))) { my $short_path = Win32::GetShortPathName("$dir\\$long_file_name"); (my $short_file_name = $short_path) =~ s#^.*[\\/]##; ... }
For fun,
$dir = ...; @files = map { (split(' ', substr($_, 39)))[0] } split("\n", `dir /x "$dir"`);
will also do the trick.
In reply to Re: readdir and short file names
by ikegami
in thread readdir and short file names
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |