Skip to Content
author's profile photo Former Member
Former Member

using ftp with a command file as run("ftp -s" + file attachement")

The executing file stop in the command ascii on

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 02, 2014 at 09:15 AM

    should be good if you attach all your commands file so we can test the whole file.

    Regards.

    Abdallah.


    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 02, 2014 at 02:56 PM

    Have you checked http://www.topwizprogramming.com/freecode_ftpclient.html ?


    Regards,


    _________________

    AUS Julián Tagarro

    NeoSistemas SRL

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 02, 2014 at 02:32 PM

    I prefer to first build a separate string containing the actual command and then passing that to the run() command. Makes it easier to determine if the string is (in)correct. So something basc like:

    string ls_run, ls_filename

    ls_run = "ftp -s " + ls_filename

    run(ls_run, Minimized!)

    Just by looking at your code, I would expect that you are missing a space after the -s" , but without knowing what 'file attachement' looks like, I can't say for sure.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 02, 2014 at 02:52 PM

    Hi Yehuda,

    I tested with PB12.5.2 and it works fine.

    I use : run ("ftp -s:c:\temp\ftp_commands.txt remotemachine.domain.com ")

    and the file ftp_commands.txt contains :

    my_username

    my_password

    lcd c:\temp

    cd /tmp

    ascii on

    put my_textfile

    quit

    the remote machine is a Unix machine. Do you have the ':' after the -s /

    Regards.

    Abdallah.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.