View Single Post
  #1660  
Old 08.02.2021, 05:53
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,553
Default

Quote:
Originally Posted by dariotoby View Post
... have a text file in the same folder ... after the download is finished, where the file name is shown and ... the download link.
Code:
/*
    Write info to text file
    Trigger:  A Download stopped
*/

if (link.finished) {
    var name = link.name;
    var url = link.contentURL || link.pluginURL;
    var data = [name, url];

    var file = "linkInfo";
    var folder = link.package.downloadFolder;
    var filePath = getPath(folder + "/" + file + ".txt");

    writeFile(filePath, data.join(", ") + "\r\n", true);
}
Reply With Quote