Menu

FTP usage

Anonymous
2011-05-16
2012-09-04
  • Anonymous

    Anonymous - 2011-05-16

    Hi All,

    I am new to WebHarvest. I have question about downloading files from remote
    server to local pc, for example by using FTP plugin. Could I do the file
    transfer in traditional way? Without wrapping the FTP inside a <file>
    processor.

    For example, the following config code segment would not 'download' the file
    to my pc.

    <config>

    <ftp server="203.123.123.123" username="car_123" password="car123">

    <ftp-get path="/download/PO/PO.xml"/>

    </ftp>

    </config>

     
  • Alex Wajda

    Alex Wajda - 2011-05-16
    1. What do you mean by "traditional way"?
    2. Why in the world you ever need <file> to get FTP resource?
    3. The snippet from your post will download the file from FTP.
     
  • Anonymous

    Anonymous - 2011-05-18
    1. 'Traditional' means if i execute the following commands.
      ftp 203.123.123.132

    cd /msdos

    get AA.EXE

    A file named AA.EXE will be saved in my pc's file system. But execute the code
    snippet in my original post will not create/save a file in my local pc.

    1. I am sorry. I don't quite understand your comment. What is wrong if I want to get a <file> by FTP with WebHarvest? Our company exchange data in XML format by FTP. The snippet from my post will not create a file PO.xml in 'local' computer.
      I can separate the FTP process from webharvest but then what is the purpose of
      supporting FTP in webharvest?

    2. Yes it download but will not create a copy in local file system unless I wrap it in <file action="write"> I just wonder if I can achieve something in (1).

     
  • Taras Emelyanenko

    1. 'Traditional' means if i execute the following commands.

    Better use a <script> for this operation.

    3.

    with <ftp> you can download only to memory.

     
  • Alex Wajda

    Alex Wajda - 2011-05-18

    Don't confuse FTP protocol with "ftp" command-line tool.

    FTP protocol doesn't specify the way the received data is consumed. It even
    doesn't have GET command. The one is just that particular FTP command-line
    client tool's command, but not FTP one.

    I don't know why you want to avoid using <file> tag, but you have to do it to
    store any data to the file system.

    So again, to be clear - <ftp> is about getting the data via FTP while <file>
    is about storing anything to the file system.

    Hope it helps.

     
  • Anonymous

    Anonymous - 2011-05-19

    Hi Wajda79,

    Thank you for your reply. I have been using FTP client apps for quite awhile.
    That is why I have this perception. I totally agree the protocol doesn't
    specify the way received data is consumed. The client apps I have worked with
    would Transfer a file from remote host to local (my pc for example) file
    system. Which I can later process with other tools.

    I will wrap the <ftp> with <file> if I ever need to save it to file system.
    Thank you for making it clear.

     
  • Anonymous

    Anonymous - 2011-05-19

    Hi phplaboratory,

    Yes, it downloads to memory only. Really deviate from the FTP clients I used
    before.....

     

Log in to post a comment.