D
Dave Saville
I have a script that needs to obtain a list of files. The script takes
an argument as to where to start looking in the directory tree. So I
issue
find(\&wanted, $start);
If $start equals drive and directory such as t:/foo then all is fine.
But if I need to start in the root of a drive such as t: then find
throws an error:
Can't stat t:: No such file or directory
Note the double colon.
t: & t:/ both give the same error.
Just giving t gives a slightly different error with t: rather than t::
t:/. works as does t:. - but messes all subsequent returned fully
qualified paths as in t:/./foo.
Any ideas gratefully received. What I am doing for now is check if it
is only a drive and change start to 'x:.' then inside wanted() I strip
that off and replace with what was supplied. Messy, there must be a
better way.
an argument as to where to start looking in the directory tree. So I
issue
find(\&wanted, $start);
If $start equals drive and directory such as t:/foo then all is fine.
But if I need to start in the root of a drive such as t: then find
throws an error:
Can't stat t:: No such file or directory
Note the double colon.
t: & t:/ both give the same error.
Just giving t gives a slightly different error with t: rather than t::
t:/. works as does t:. - but messes all subsequent returned fully
qualified paths as in t:/./foo.
Any ideas gratefully received. What I am doing for now is check if it
is only a drive and change start to 'x:.' then inside wanted() I strip
that off and replace with what was supplied. Messy, there must be a
better way.