Kaseya Community

Check for full download of file downloaded with GetURL() Command

  • What is the best way to check if a large file downloaded with the GetURL() command has fully downloaded?  We have the "Wait for completion" option chosen as well as "halt on fail".  Currently, we download the file, then use an "ExcecuteShellCommand" to do a directory of the file downloaded in the directly downloaded to and pipe the results to a file.  Then we read the file using the "TestFile" command and check for the existence of the file size string.  This works, but I'm thinking there has to be an easier way.

    Any help would be appreciated.

    Thanks. 

  • This is basically what I'm doing, except I'm using GetVariable with File Size to get the size of the downloaded EXE and then checkVar to see if it's equal to the hard-coded value.

  • Thanks you for your reply.  I was unaware that option existed with the GetVariable() command.  That will make my life a bit easier as this strips out the punctuation in the file size.  I have some clients that are in countries where the thousands separator is a space, some where it is a period, and some where it is a comma.  This File Size option of the GetVariable() command makes all of that punctuation irrelevant.  

    Thanks.