> > find {
> > preprocess => sub { grep( /My\s+Documents/, @_) },
> > wanted => sub { print "$File::Find::name\n"}
> > }, 'c:/test2';
>
> Firstly don't forget that Windows treats the 'My Documents' directory
> as a special case. Windows Explorer shows it at the same tree level
> as My Computer and Recycle Bin, and it has no disk device associated
> with it. Fortunatley Fil::Find will find it in '/', whichever
> disk drive
> happens to be the current one.
C:\test2 was just a mock directory to emulate the network folder i was
dealing with. The actual server\directory has a folder foreach user and
each contains a 'data' directory with one or more DFS links and a physical
'My Documents' directory. SO it is not the actual 'My Documents' directory i
think that you were referring to above.
>
> Secondly, the preprocess routine is called with $File::Find::name set
> to the current directory being processed, while @_ holds the names
> of all files and directories contained here. The idea is that you must
> return the subset of @_ in which you are interested: File::Find will
> continue to process only those files which remain. (This means that
> excluded files will not be passed to the wanted routine, and
> excluded directories will be removed from the directory tree.
>
> What you need to do then, is to include all of those files where
> 'My Documents' is in either $File::Find::name or @_. One way
> to do this is to write:
>
> preprocess => sub {
> ($File::Find::name =~ m(/My Documents\b)
> ? @_
> : grep { $_ eq q(My Documents) } @_
> )
> },
>
> However, having said all that, the best solution to this
> particular problem is:
>
> find {
> wanted => sub { print "$File::Find::name\n"}
> }, '/My Documents';
>
> unless you have a 'My Documents' directory beneath C:/test2?
See my explanation above. Thanks for your help.
Jim
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]