Automic Workload Automation

Expand all | Collapse all

How can i create a new file based on the listing of an ftp directory.

  • 1.  How can i create a new file based on the listing of an ftp directory.

    Posted 01-29-2018 09:52 AM

    I am trying to list the contents of an ftp directory and create a new file on a shared location.

    • FTP List
    • Store the listing in a file on a shared location (\\shareddrive\listing.txt)


  • 2.  How can i create a new file based on the listing of an ftp directory.

    Posted 01-29-2018 11:36 AM
    Hi!

    Most command line FTP clients support some degree of scriptability and/or output redirection, so you could use the FTP client's native functions, or the Posix operators such as ">" or ">>" to redirect the listing into a file. Unless it's Automic's own RA FTP Agent, with which this task will probably be more complicated.

    If you desire any more than this somewhat generic answer, then please would you terribly mind sharing a few details with us, such as the platform, and most importantly, what FTP client you're using? Unless it is, in fact, the RA agent, that may turn out to be a question that doesn't really concern the Automic software much, but we'll try to give it a shot anyway.

    Thanks!


  • 3.  How can i create a new file based on the listing of an ftp directory.



  • 4.  How can i create a new file based on the listing of an ftp directory.

    Posted 01-29-2018 11:46 AM
    Unfortunately it is the RA FTP Agent. I am new to automic and I need a solution to complete this within automic, I do not have the option to complete this from an external tool or script


  • 5.  How can i create a new file based on the listing of an ftp directory.

    Posted 01-29-2018 12:11 PM
    Afam_Oyib_10077

    I have checked the Free Command of RA FTP but I do not see any option to create a new file

    https://docs.automic.com/documentation/webhelp/english/ALL/components/RA_FTP/latest/Agent%20Guide/help_en.htm#RA/FTP/AWI/Free_Form.htm%3FTocPath%3DWorking%2520with%2520RA%2520FTP%2520Agent%2520Jobs%7CCreating%2520RA%2520FTP%2520Agent%2520Jobs%7C_____9

    I would suggest to contact our Professional Service team as they may have an out of the box solution. In addition, I think your requirement is a very good product enhancement because our Free Form command has an option to create a new directory so we should have an option to create a new file. Please post your ideas(product enhancement) in ideas.automic.com .


    Thanks
    Bob


  • 6.  How can i create a new file based on the listing of an ftp directory.

    Posted 01-29-2018 12:14 PM
    Bobby Tamayo said:
    Afam_Oyib_10077

    I have checked the Free Command of RA FTP but I do not see any option to create a new file
    bobby_tamayo_automic

    Do the Free Form commands work for you? If so, you could try a free form command such as:

    ls / c:\output.txt

    Most ftp clients appear to honor the output file, and redirect there, unless its ommitted, in which case stdout is assumed. It's possible the RA agent's java library follows the same convention.

    I was trying this, but I can't get freeform commands to work eventhough I switched my agent to "Enable remote execution" in client 0 and restarted it, as per this.


  • 7.  How can i create a new file based on the listing of an ftp directory.

    Posted 01-29-2018 12:24 PM
    Afam_Oyib_10077

    Sorry - as I said it might be possible to do this via freeform commands, but I can't get my RA agent to process them. So I can't confirm or deny whether it works that way.

    Unless someone else weighs in, you might want to go with bobby_tamayo_automic recommendation of asking Professional Services, or Automic Support, or use an external, scriptable FTP client (on UNIX lftp is great, on Windows I wouldn't know). If you need to do more things in the future that are more involved than basic FTP commands, I'd definetly go that route anyway.

    Best,
    Carsten


  • 8.  How can i create a new file based on the listing of an ftp directory.

    Posted 01-29-2018 12:53 PM
    There is the "List" command in the RA FTP agent as seen above.   What you are asking to do, is save that result in OS file correct?   
    Automic does hold the report output in the database or an OS file.  The report file would have a name like OABGNWMF.TXT and would be on the RA FTP agent server.   The exact name is calculated from the specific JOBID



  • 9.  How can i create a new file based on the listing of an ftp directory.

    Posted 01-29-2018 01:22 PM


  • 10.  How can i create a new file based on the listing of an ftp directory.

    Posted 03-13-2018 04:41 AM
    Hello Afam_Oyib_10077

    I do not think this is possible with the RA FTP agent itself.

    I did a bit of testing, and it turns out that the FTP agent is not able to write a file, be it using the free command form (ls <path> > filelist.txt) or the Automic script (PREP_PROCESS_FILENAME() or PREP_PROCESS_REPORT() and then WRITE_PROCESS).

    So in your case, it would probably be better to use an OS agent (Linux / Windows) to perform this step.

    Best regards,
    Antoine