Help for this page

Select Code to Download


  1. or download this
    while (defined($long_file_name = readdir(DIR))) {
       my $short_path = Win32::GetShortPathName("$dir\\$long_file_name");
       (my $short_file_name = $short_path) =~ s#^.*[\\/]##;
       ...
    }
    
  2. or download this
    $dir = ...;
    @files = map { (split(' ', substr($_, 39)))[0] }
                split("\n", `dir /x "$dir"`);