in reply to File:Find::Rule on Win32
I am not sure what is your file system but Windows has a limitation with the number of chars on the path.
I found this link which talks about how the Win32 API call can be made so that the path will be treated as a unicode. I tried to use it in Perl and did not work.
http://cert.uni-stuttgart.de/archive/bugtraq/2002/01/msg00376.html
I tried to create a deep path on my Windows XP pro. It did not get ver far
#!/usr/bin/perl -w my $path = "/monktemp"; chdir($path) or die "Cannot chdir to /monktemp: ($!)"; for (1..300) { mkdir("monk", 0755) or die "Cannot mkdir monk: $!"; chdir("monk") or die "Cannot chdir to monk: ($!)"; $path .= "/monk"; print ("Done Processing $_ levels: Path length so far =", length($ +path),"\n"); }
Output:
I haven't looked at the Documentation for the exec method yet but not sure whether any non-system method can be made to go deeper than 255 char limitation!...... ...... Done Processing 45 levels: Path length so far =234 Done Processing 46 levels: Path length so far =239 Done Processing 47 levels: Path length so far =244 Cannot mkdir monk No such file or directory at createdir line 7.
cheers
SK
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: File:Find::Rule on Win32
by puploki (Hermit) on Jul 24, 2005 at 20:20 UTC |