Automic Workload Automation

Expand all | Collapse all

FTP directory testing

Jump to Best Answer
  • 1.  FTP directory testing

    Posted 12 days ago

    Hi All,

    I need some help!

    I have to make a job that testing directory existing on FTP server  than download all files if the condition is yes.

    How can I test it with FTP commands?

    Thank your help in advance!

    Bálint



  • 2.  RE: FTP directory testing

    Posted 12 days ago

    Hello.

    What's your FTP client? RA agent or something else? Or is that as of yet undecided? In the later case: what's your target platform?

    You'll find a majority of people are in a much better position to provide you with faster quality answers if provided with the essential information ahead of time.

    Thanks!



    ------------------------------
    These contain very good advise on asking questions and describing supposed bugs (no, you do not need to go to StackExchange for Automic questions, but yes, the parts on asking detailed, useful questions ARE usually relevant):

    http://www.catb.org/~esr/faqs/smart-questions.html

    https://www.chiark.greenend.org.uk/~sgtatham/bugs.html

    I will not respond to PM asking for help unless there's an actual reason to keep the discussion off of the public forums.
    ------------------------------



  • 3.  RE: FTP directory testing

    Posted 12 days ago
    Edited by Balint Horvath 12 days ago

    Hi Carsten,

    Thank your fast react. Sorry I had not writen details.

    I use WA Agent to call and enter FTP. The host is Linux.

    Thank you! :)




  • 4.  RE: FTP directory testing

    Posted 12 days ago
    ​Hi Balint,

    Unfortunately I don't know of any WA agent. In case you meant the RA agent, and I hope I understand your request correctly:

    Any attempt to either list a directory that doesn't exist, or cd into it will result in a failure. That failure will result in an ENDED_NOT_OK.

    You can either do it like shown below in one job, and have the "Abort the job on command failure" box checked. Or you split it into two FTP jobs, put them in a job plan. The first does an "ls" or "dir" as shown below, and the second fetches all files only on the condition that the first one was ENDED_OK.


    Hth,

    ------------------------------
    These contain very good advise on asking questions and describing supposed bugs (no, you do not need to go to StackExchange for Automic questions, but yes, the parts on asking detailed, useful questions ARE usually relevant):

    http://www.catb.org/~esr/faqs/smart-questions.html

    https://www.chiark.greenend.org.uk/~sgtatham/bugs.html

    I will not respond to PM asking for help unless there's an actual reason to keep the discussion off of the public forums.
    ------------------------------



  • 5.  RE: FTP directory testing

    Posted 12 days ago

    Yes I thought about this idea but it makes more ENDED_NOT_OK report in the process monitoring :)




  • 6.  RE: FTP directory testing

    Posted 12 days ago
    Well ... now that's a requirement I can not ​offer any immediate assistance with :)


    ------------------------------
    These contain very good advise on asking questions and describing supposed bugs (no, you do not need to go to StackExchange for Automic questions, but yes, the parts on asking detailed, useful questions ARE usually relevant):

    http://www.catb.org/~esr/faqs/smart-questions.html

    https://www.chiark.greenend.org.uk/~sgtatham/bugs.html

    I will not respond to PM asking for help unless there's an actual reason to keep the discussion off of the public forums.
    ------------------------------



  • 7.  RE: FTP directory testing
    Best Answer

    Posted 12 days ago
    Hi

    with a bit of magic, additional scripting and the command :MODIFY_STATE in post_process this can be done easily :-)

    https://docs.automic.com/documentation/webhelp/english/AA/12.3/DOCU/12.3/Automic%20Automation%20Guides/help.htm#Script/Reference/MODIFY_STATE.htm%3FTocPath%3DReference%7CAutomation%2520Engine%2520Script%2520Reference%7CScript%2520Elements%2520Ordered%2520by%2520Purpose%7CTasks%7C_____14

    cheers, Wolfgang

    ------------------------------
    Support Info:
    if you are using one of the latest version of UC4 / AWA / One Automation please get in contact with Support to open a ticket.
    Otherwise update/upgrade your system and check if the problem still exists.
    ------------------------------



  • 8.  RE: FTP directory testing

    Posted 12 days ago
    ​Nooooooooooooo! :)

    So sorry Wolfgang but this has been discussed six months ago repeatedly: :MODIFY_STATE is for generating faux return codes from JCL, not for modifying Automic ENDED_NOT_OK into something else. It could be used if he used an external ftp client such as lftp. It's not of any value for RA agent, it can not modify Automic states retroactively.

    *scnr*


    ------------------------------
    These contain very good advise on asking questions and describing supposed bugs (no, you do not need to go to StackExchange for Automic questions, but yes, the parts on asking detailed, useful questions ARE usually relevant):

    http://www.catb.org/~esr/faqs/smart-questions.html

    https://www.chiark.greenend.org.uk/~sgtatham/bugs.html

    I will not respond to PM asking for help unless there's an actual reason to keep the discussion off of the public forums.
    ------------------------------



  • 9.  RE: FTP directory testing

    Posted 11 days ago
    Apparently :MODIFY_STATE can be used to modify return codes from RA agent steps in the POST_PROCESSING of an RA job.

    Kudos to @Wolfgang Brueckler for figuring that out.


    ------------------------------
    These contain very good advise on asking questions and describing supposed bugs (no, you do not need to go to StackExchange for Automic questions, but yes, the parts on asking detailed, useful questions ARE usually relevant):

    http://www.catb.org/~esr/faqs/smart-questions.html

    https://www.chiark.greenend.org.uk/~sgtatham/bugs.html

    I will not respond to PM asking for help unless there's an actual reason to keep the discussion off of the public forums.
    ------------------------------



  • 10.  RE: FTP directory testing

    Posted 11 days ago
    Hello Balint,

    without been tested I would do it this way:

    1. Create a Workflow with two FTP-Jobs
    2. First FTP-Job does a "ls" -> In Post-Script check the report and if the directory is existing -> set a variable to "ok"
    2. Second FTP-Job checks the variable, for example in precondition -> if variable is "ok" -> download the files, else skip the job

    Bernhard

    ------------------------------
    Landeshauptstadt München
    ------------------------------