Kaseya Community

Get file automatically

  • I have a Point of Sale that writes an .xml file for every customer transaction. We would like to use Kaseya to pull that xml file and store on the KAseya server every time a new xml is written. The only thing I can do right now is use the log parsing, but would love to have the whole .xml file. Not sure on where to go from here.

    Ideas?

     

    Thanks!

  • Use the get file command

    Specify the location and name of the file and then it will be uploaded to the Kaseya Server in the machines userprofile folder

    e.g. C:\Kaseya\UserProfiles\103972288668271   ..... the number being the machines agentguid

  • Levi,

    If I'm understanding what you want to do, you could use a combination of things and probably get what you're looking for.  Rather than looking at it as getting new .xml files when a new .xml is written, look at it more from getting the .xml files that have been written since the last time the agent procedure collected them.  To do this, you might try the following steps or something similar

    1)  Use the forfiles command to copy all files with a creation date of one day ago to a different directory

    2)  Use the ftp command to ftp/sftp the files back to your ftp server

    3)  Delete all the .xml files from the copied directory

    4)  Schedule the procedure to run every day

  • Paul - Thanks, but can I specify the *.xml instead of the filename? that way, every new xml written would be transferred.

    Seftink - Awesome, except their firewalls are blocking all outbound connections, so only traffic can be the Kaseya agent. Thats why I am trying to pull the files automatically.

  • Levi,

    How about combining Paul and I's ideas.  After step 1 in my suggestion, write a command line zip program to the copy directory, run the command line zip to zip *.xml to a file name you control (i.e. clientrans.zip) that always stays the same.  Then use the Get File command to get that zip file and ensure it is set not to replace previous copies (previous files would be automatically renamed), then delete *.xml and *.zip from the copied directory, and run the scheduled procedure on a daily basis.

  • What about the log parser? Can I create a log parser that parses all data? Like *??

  • I don't believe so

  • I was thinking along the same lines as seftink

    6.3 has 2 built in command to Zip and unzip  folders and files

    So if you use these then you can zip all the files in the folder

    Use get file to pull the new zip file back to the Kaseya server

    Then unzip the file.

    This way you don;t need to know what the individual file names are as you just zip the entire folder

    And as you can name the zip file as it is created .. then you only need to know this zip file name when you unzip them