View Single Post
Old 03.04.2018, 18:29
patriks patriks is offline
Vacuum Cleaner
Join Date: Aug 2017
Location: Brasil
Posts: 15

Originally Posted by mgpai View Post
You can use
var myBoolean = myFilePath.exists();
to check if the file exists on disk and then use
var myBoolean = myDownloadLink.remove();
to remove it, or use
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.
Reply With Quote