Quote:
Originally Posted by mgpai
You can use
Code:
var myBoolean = myFilePath.exists();
to check if the file exists on disk and then use
Code:
var myBoolean = myDownloadLink.remove();
to remove it, or use
Code:
myDownloadLink.setEnabled(true);
to disable it.
Hope I have understood your problem correctly.
|
The script renames the file "XcPSjYTp12c.jpg" to
"
album392220242_00_392220242_456239144 -
XcPSjYTp12c.jpg"
link.setName(link.getProperty("LINKDUPEID") + " - " +
link.getProperty("FINAL_FILENAME"));
but when the downloadlist is cleaned and I make a new download (it checks for new versions), it detects the duplicate file, shows error message and ignores the script, downloading with normal name "XcPSjYTp12c.jpg", generating a duplicate file.
I could not use your commands, I do not have much experience with the scripts yet.