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