Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: FTP Get Directory Tree Only

by randyk (Parson)
on Aug 15, 2006 at 02:25 UTC ( [id://567381]=note: print w/replies, xml ) Need Help??


in reply to FTP Get Directory Tree Only

If you have access to the server, or know someone who does, one solution would be to generate a ls-lR.gz file, listing all the files below the desired root, and then grab and parse this file. For this, File::Listing would be handy.

Replies are listed 'Best First'.
Re^2: FTP Get Directory Tree Only
by roboticus (Chancellor) on Aug 15, 2006 at 11:21 UTC
    If that's an acceptable solution, then you might also try the command:
    find . -type d
    which will give you a list of directories in a more convenient form, e.g.:
    . ./.cpan ./.cpan/build ./.cpan/build/Authen-SASL-2.10 ./.cpan/build/Authen-SASL-2.10/blib ./.cpan/build/Authen-SASL-2.10/blib/arch ./.cpan/build/Authen-SASL-2.10/blib/arch/auto ./.cpan/build/Authen-SASL-2.10/blib/arch/auto/Authen ./.cpan/build/Authen-SASL-2.10/blib/arch/auto/Authen/SASL ./.cpan/build/Authen-SASL-2.10/blib/lib ./.cpan/build/Authen-SASL-2.10/blib/lib/Authen ./.cpan/build/Authen-SASL-2.10/blib/lib/Authen/SASL ./.cpan/build/Authen-SASL-2.10/blib/lib/Authen/SASL/Perl ./.cpan/build/Authen-SASL-2.10/blib/lib/auto ./.cpan/build/Authen-SASL-2.10/blib/lib/auto/Authen ./.cpan/build/Authen-SASL-2.10/blib/lib/auto/Authen/SASL . . . etcetera . . .
    --roboticus
Re^2: FTP Get Directory Tree Only
by Cody Pendant (Prior) on Aug 15, 2006 at 02:45 UTC
    Thanks for that. Great idea.


    ($_='kkvvttuu bbooppuuiiffss qqffssmm iibbddllffss')
    =~y~b-v~a-z~s; print

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://567381]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2024-04-25 19:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found