Scripts > Get File
Use the Get File function to access files uploaded from a remote machine when scripts execute either the Get File or Get File In Directory Path commands.
The VSA stores uploaded files in a unique directory for each machine ID. Clicking the Machine ID displays the uploaded files for that machine. Each file is displayed as a link. Click any filename to access that file.
Remove uploaded files from the VSA by clicking the delete icon next to the file.
As an option in the Get File script command, existing copies of uploaded files will be renamed with a .bak extension prior to the next upload of the file. This allows you to examine both the latest version of the file and the previous version. For example, your script executes the following Get File command (Exported with Export Script... in the script editor):
Get File
Parameter 1 : c:\temp\info.txt
Parameter 2 : news\info.txt
Parameter 3 : 2
OS Type : 0
Parameter 3 : 2 indicates Save existing version, get file, and send alert if file changed. The first time the above script statement executes on a remote machine the agent sends c:\temp\info.txt to the server and the VSA stores it. The second time the above statement executes, the VSA renames the original copy of news\info.txt to news\info.txt.bak then uploads a fresh copy and saves it as news\info.txt.
Also as an option, an email alert can be sent when a change in the uploaded file has been detected (compared to the last time the same file was uploaded).
The Get File command must have either the Overwrite existing file and send alert if file changed setting or the Save existing version, get file, and send alert if file changed setting selected.
Why would I use Get File instead of FTP?
If all you want to do is get a file from a remote machine as a one-time event then FTP is the simplest way. Get File is designed to support automated checks on a large number of remote machines simultaneously.
Use Get File in conjunction with a script to perform some automated task on a set of remote machines. For example, if you have a utility that reads out some information unique to your managed computers you can write a script to do the following:
Send the utility to the remote machine (using either the Write File script command or the Distribute File function.
Execute the utility using either the script command Execute DOS Command or Execute File and pipe the output to a text file (results.txt)
Upload the file to the server using the Get File command.
To perform continuous health checks on the remote machine, run the script on a recurring schedule and activate Get File Changes alerts. The VSA instantly notifies you of any changes to the results.
How do I get files from remote machines?
Any script executing a Get File or Get File In Directory Path command writes the file to the directory viewable from this function. You have to write a script to put files into this directory.
I see files present that I did not upload. Where did they come from?
Other administrators or a VSA system function like Hot Fix Check fetched these files. Any script executing a Get File command writes the file to the directory viewable from this function.