View Single Post
  #1548  
Old 20.10.2020, 09:06
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,415
Default

Quote:
Originally Posted by Artex View Post
... move completed downloads into a 'subfolder' of the "c:/myFolder/movedFiles" that has the same name as the file or folder being downloaded.
Code:
// Move downloaded non-archive files to user-specified folder
// Trigger: A Download Stopped

if (link.finished && !link.archive) {
    var downloadFolder = link.package.downloadFolder;
    var newFolder = downloadFolder.replace("C:\\Downloads", "C:\\myFolder\\MovedFiles"); // case-sensitive

    if (newFolder != downloadFolder) {
        getPath(link.downloadPath).moveTo(newFolder);
    }
}
Reply With Quote