http://www.perlmonks.org?node_id=818204


in reply to I go crazy with windows filenames with spaces!

If you are running on windows XP or higher you don't need to escape the blank space.

Try this:

my $path = 'C:\Documents and Settings\Administrator\Desktop'; opendir(DIR,$path) or die $!; while (my $File = readdir DIR) { print "$File\n"; } closedir(DIR);

As I remember older versions of windows only support 8 characters long file/folder name so you'll have to use 6 characters and add ~1 at the end of the file name.

I am not very sure I haven't used old windows OS from like 6 years now