Thread: [Solved] Help for eventscript needed
View Single Post
  #8  
Old 10.02.2017, 13:02
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 612
Default

Code:
// If file already exists in other user defined folders disable the download.
// Trigger Required: "A Download Started".
// Forum Topic: https://board.jdownloader.org/showthread.php?t=72564.

var file = link.getName();
var folders = ["c:/downloads/1/", "c:/downloads/2/", "c:/downloads/3/"]; // <- Check if file exists in these folders

for (i = 0; i < folders.length; i++) {
    var folder = folders[i];
    if (getPath(folder + file).exists()) link.setEnabled(false);
}
Reply With Quote