in reply to Re^2: File::Find problems
in thread File::Find problems
That seems like a faulty path to me because the space in "Volume Name" is not escaped.
Why would you expect something other than a path from File::Find? It was escaped, it wouldn't be a path.
You need to escape something when you want to embed one thing into another. (A path in a glob pattern, a string in Perl code, a string in a command line, etc) How you escape it also dependent on what you want to embed it into. Once it's escaped, it's no longer a path. (It's a glob pattern, a Perl string literal, a shell string literal, etc)
Yes, I've decided I have NO IDEA how to deal with path names containing spaces
In a glob pattern? You've already been given two solutions. Escape the space or use bsd_glob.
I also think the error given by rename() sucks: it doesn't tell you which path is faulty.
It's not like you checking two paths is harder than checking one when you have a problem.
The system simply returns a number which represents the error message.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: File::Find problems
by 7stud (Deacon) on Jan 15, 2010 at 08:23 UTC | |
by ikegami (Patriarch) on Jan 15, 2010 at 08:28 UTC | |
by 7stud (Deacon) on Jan 15, 2010 at 08:33 UTC | |
by ikegami (Patriarch) on Jan 15, 2010 at 08:41 UTC | |
by 7stud (Deacon) on Jan 15, 2010 at 08:48 UTC | |
| |
by ikegami (Patriarch) on Jan 15, 2010 at 08:45 UTC | |
by 7stud (Deacon) on Jan 15, 2010 at 08:56 UTC |