Automic Workload Automation

  • 1.  Iterative Processing

    Posted Apr 19, 2018 12:05 PM

    Hi

     

    As part of our GDPR project I've been asked to write an Automic function that deletes files over a specific age.

    This will all be controlled by a VARA Object.

     

    I'm given a "root" folder and then have to delete all files in that folder older than specified - That's the easy bit.

    Then they want me to run down any subfolders and delete relevent files then check for subfolders etec, etc, etc. - the iterative bit.

     

    There will be exclusions so I can't just write a simple script I have to check if the folder is excluded.

     

    I was going to write a Windows JOBS Object that deletes the files (in a folder specified by a Script Variable) then loops through all the subfolders and calls itself to repeat the delete function on any files in that folder etc, etc.

     

    I've looked into this and found that ACTIVATE_UC_OBJECT can't call itself.

     

     

    Any Ideas?

     

    Mick



  • 2.  Re: Iterative Processing

    Posted Apr 19, 2018 02:26 PM

    Hi Mick,

     

    I saw you mention the AE script function activate_uc_object, as such I have moved this post to the CA Automic Workload Automation space/community to better help with your scenario.



  • 3.  Re: Iterative Processing

    Posted Apr 20, 2018 04:29 AM

    Thanks Luu Le.  I'm still finding my way around the new CA sites



  • 4.  Re: Iterative Processing

    Posted Apr 20, 2018 05:48 PM

    Totally understand, feel free to send me a PM or drop me an @mention or post within The Water Cooler if you have any questions regarding the Community 



  • 5.  Re: Iterative Processing

    Posted Apr 20, 2018 04:13 AM

    Hi

     

    What about PREP_PROCESS_FILENAME ?

     

    Here you can define Subfolders and get the filename returned. If it should be deleted or not you could determine using a OS JOB or PREP_PROCESS+OS Command

    For file deletion you can use the same method.

     

    Automic 

    Automic

     

    cheers, Wolfgang



  • 6.  Re: Iterative Processing

    Posted Apr 20, 2018 04:30 AM

    Hi Wolfgang

     

    Thanks for that, I'll have a look into that :-)

     

    Mick