Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Net::FTP::Recursive question

by sivak1976 (Novice)
on Aug 01, 2007 at 13:47 UTC ( #630051=note: print w/replies, xml ) Need Help??


in reply to Re: Net::FTP::Recursive question
in thread Net::FTP::Recursive question

I am running on Linux so the "ls" command is available. Also, there is no error message warning me of anything. If I run the program on Windows, I get an error message.

Replies are listed 'Best First'.
Re^3: Net::FTP::Recursive question
by regexes (Hermit) on Aug 01, 2007 at 14:35 UTC
    Hello,

    I think that is exactly soopy's point. If you are running the script on a Linux machine, you will not have the error because "ls" is the usual command for listing directory contents.

    The "ls" command does not exist on a Windows machine. So the error occurs.

    Or are you are running your script from a Linux machine and trying to recursively put to a Windows machine? Doesn't matter... it still won't work because the "ls" command on the Windows box will fail. It doesn't exist.

    regexes
Re^3: Net::FTP::Recursive question
by snoopy (Curate) on Aug 02, 2007 at 00:12 UTC
    Hmmm. Your code works for me under Linux. Some other suggestions:

  • It's not just that the files ending up where you expect? The contents of ABC are going to the home directory. If your intention is to replicate ABC directory. You'll need to create it and cd to it yourself:
    $ftp_obj->mkdir('ABC'); # make sure the directory exists $ftp_obj->cwd('ABC') || die $ftp_obj->message;;
  • Set Debug => 1 when you open the ftp object. It'll give you lots of useful debugging info.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2022-05-24 13:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (82 votes). Check out past polls.

    Notices?