Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
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 */
};
Subsystems["FileTransferSubsystem"].Copy(params);
*** 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.