Automic Workload Automation

Expand all | Collapse all

File Transfer - Write transferred file names to variable

  • 1.  File Transfer - Write transferred file names to variable

    Posted 04-27-2018 12:00 AM

    Hi there,

     

    I want to do a file transfer (using the file transfer object) and write the filenames that were successfully transferred to a variable.

    What's the best way of achieving this?

    I have attempted doing a post process prep_process_report, however the prep_process_report is failing, more than likely due to this issue: PREP_PROCESS_REPORT function not working in file transfer object .  Even if this was working, I'm struggling to get the script working to get just the filenames (I've tested using a windows object)

     

    Does anyone have a good way of achieving this? I'd be happy with a script for prep_process_report looking at a command prompt DIR.

     

    Thanks,

    Scott



  • 2.  Re: File Transfer - Write transferred file names to variable

    Posted 04-27-2018 03:29 AM

    Hi

     

    You can use script command GET_STATISTIC_DETAIL with parameter DST_FILE_NAME.

    This only works if you use a single filetransfer, no wildcards and returns only the selected file, not if it was successful or not !!

     

    Otherwise its a lot of scripting with string-functions to get the data out of the report (PRO: you only get the successfully transferred filenames)

     

    another idea: do a prep_process_filename with the selection of the JOBF object - its not 100% safe if the JOBF runs longer...

     

    last Idea: do you insist in a JOBF?

    If not, you can create a script or job, do a prep_process_filename in it and start an OS job for every file-move(or copy) - in Post process of your file move job you can update the variable objct.

     

    cheers, Wolfgang

     

     

    Automic 



  • 3.  Re: File Transfer - Write transferred file names to variable

    Posted 07-20-2018 02:37 AM

    Thanks Wolfgang.

    I'm simply copying all folder contents now, so no need for the individual filenames anymore.

    Thanks for your answer, I will be sure to use some of your answer in future scripts.



  • 4.  Re: File Transfer - Write transferred file names to variable

    Posted 07-20-2018 03:51 PM

    Your 're welcome :-)

     

    cheers, Wolfgang