For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > June 2007 > Re: Algorithm or module needed









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Algorithm or module needed
Xavier Noria

2007-06-01, 6:59 pm

On Jun 1, 2007, at 4:29 PM, Beginner wrote:

> Hi,
>
> I am trying to copy some file from a removable HDD to a network
> drive. I want replicate the directory structure and omit un-needed
> files.
>
> The directory paths a 4-5 levels deep and I am trying to work out an
> efficient way to recreate the directory path.
>
> What I've been doing is using File::Find to collect the file and then
> in the coderef calling the following subroutine to check the path but
> i didn't go too far as my method seems....well not well formed.
>
> The path to a source file looks like:
>
> e:/Dir1/Day 1/AM/01/myfile.jpg


I think you want File::Path's mkpath. File::Path is a standard module.

-- fxn



Beginner

2007-06-01, 6:59 pm

Thanx that's done exactly what I wanted.
Dp.

On 1 Jun 2007 at 16:34, Xavier Noria wrote:

> On Jun 1, 2007, at 4:29 PM, Beginner wrote:
>
>
> I think you want File::Path's mkpath. File::Path is a standard module.
>
> -- fxn
>
>
>
>
> --
> To unsubscribe, e-mail: beginners-unsubscribe@perl.org
> For additional commands, e-mail: beginners-help@perl.org
> http://learn.perl.org/
>
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com