Kaseya Community

Use Variable to Copy Files (File Name)

This question has suggested answer(s)

Hi.  I'm trying to write a script to copy logo files to workstations based on their computer name.  The script will pull the system name, query a database to get the correct logo information and then needs to copy the corresponding zip files based on the variable returned from the database query.  However, I'm having trouble getting the get file command to work with a "variable file name."  Is this doable? 

If not, can I drop to command line, but still refer to the location of the files on the Kaseya Server?  The clients have opened their firewalls to allow access to Kaseya, so preferably, they would be able to retrieve the files from the Kaseya Server via URL? 

Thanks in advance for any assistance.


All Replies
  • Hi did you get this sorted.

    where are the logo files stored and what DB are you querying?

    Just trying to understand what it is your looking for...

  • I think the Write File (Get File) process allows you to simply select a file from a list of files stored somewhere in the managedfiles area.  I don't believe variables are an option with this method.

    As you simply want to copy a file from a location on the web to a local machine I suggest using FTP to download your variable filename.  You will be able to script that.

    Another option may be to push the appropriate logo file to the local patch source and use a copy command from there (copy is also variable friendly)

  • It's an interesting question Sara and I think it could just about be done.  

    It sounds like you've got the db query working and all you'd need to do is assign a variable name to the result of this query.

    Now you can use the Get URL procedure step and add the variable onto the end of the URL and a location to save the file to.

    Not tested but I reckon it should work