Automic Workload Automation

  • 1.  Automic V9 - how to get file size

    Posted Jan 29, 2014 02:05 PM

    I have a job that runs an SSIS package to create text files.  After the files are created, I need something to check the size of the files to make sure that they are not empty before they are processed by another application.  How do I check the size of a file?



  • 2.  Automic V9 - how to get file size

    Posted Jan 29, 2014 03:33 PM

    Depending on your needs look at the GET_FILESYSTEM Script function or perhaps the File System Event object.



  • 3.  Automic V9 - how to get file size

    Posted Jan 29, 2014 03:35 PM

    Would you happen to have an example of how to do this?  I attempted this at one point but was unable to get it to work for me.  Thank you.



  • 4.  Automic V9 - how to get file size

    Posted Jan 29, 2014 04:21 PM

    Which this?



  • 5.  Automic V9 - how to get file size

    Posted Jan 29, 2014 04:22 PM

    Preferably the GET_FILESYSTEM, but both if you have examples.  Thank you.



  • 6.  Automic V9 - how to get file size
    Best Answer

    Posted Jan 29, 2014 05:07 PM

    Here is a very basic one:

    :SET &agent = "Agent name" ! Windows Agent name where the file exists
    :SET &file = "c:\the.full.path.to.the\file.txt"
    :SET &size = GET_FILESYSTEM(&agent,&file,PATH_SPACE_USED,BYTES)
    :PRINT "Size of &file:  &size Bytes"
    ! Additional logic to communicate result such as 
    ! STOP NOMSG if subsequent tasks are not to be executed.

    Be certain to read the Comments section for the GET_FILESYSTEM function in the UC4 Script Guide.

    The Event would require that you choose an Event File Template from the pull-down when creating a new object.  Then, complete the attributes on the File System tab and others as appropriate.




  • 7.  Automic V9 - how to get file size

    Posted Jan 29, 2014 05:12 PM

    Thank you very much.