View Single Post
  #1474  
Old 26.07.2020, 13:44
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,545
Default

Quote:
Originally Posted by sherbee View Post
... Is there not API to extract values from log? I think would be useful if simply could make like: getLogValue(logfile).archivepath or getLogValue('Archive Path')

and result would be archive path like: 'c:\user\sherbee\downloads\xyz.7z'
...
You can use existing methods to extract matching strings from the log file.

Code:
var match = readFile(getPath(path_to_correct_log_file)).match(/Archive Path\: (.+)/);

if (match) {
    var archivePath = match[1];
    alert(archivePath);
}
Reply With Quote