0 Replies Latest reply on Sep 16, 2017 2:39 AM by jjohnson RSS
    jjohnson Newbie

    Compare log files on Edge and Core and transfer missing files

    Hello, I am new to ThingWorx and am in need of assistance performing an automated file compare and transfer. Here are the details:


    I am using the WSEMS (Web Socket Edge MicroServer) on Windows 7, and am transferring log (.txt) files to a repository on the Core. I am currently able to automatically transfer a named file, but do not know how to evaluate the contents from the Edge and Core and then transfer the difference. Any assistance would be appreciated!


    Here is the JS that I am using to perform the transfer of the single file:

    *** Code Start ***


    // Copy file to 'FileRepo' Thing


    var params = {

      async: undefined /* BOOLEAN */,

      sourceRepo: me.name /* STRING */,

      metadata:   undefined /* JSON */,

      targetRepo: "FileRepo" /* STRING */,

      targetFile: undefined /* STRING optional*/,

      targetPath: "/LOGS/VM/" + me.name, /* STRING */

      queueable:  undefined /* BOOLEAN */,

      sourceFile:  "Log-20170914-134542.txt"  /* STRING */,

      sourcePath: "/Thing/Logs" /* STRING */,

      timeout: undefined /* INTEGER */





    *** Code Stop ***


    This code is set as a Service on the Edge Thing which is being called by a Timer.


    Thanks in advance for any assistance.