View Single Post
Old 07.06.2020, 10:22
sherbee sherbee is offline
JD Fan
Join Date: Mar 2019
Posts: 76

Originally Posted by mgpai View Post
Here is a new script, but if you need help to troubleshoot/fix yours, contact me in JD Chat.

// Move archive files after extraction
// Trigger: Archive Extraction Finished

var links = archive.getDownloadLinks() || [];
var destinationFolder = "C:/sherbee/check";

links.forEach(function(link) {
    var filePath = getPath(link.getDownloadPath());
    var i = 0;

    while (getPath(destinationFolder + "/" + filePath.getName()).exists()) {
        newPath = getPath(link.getDownloadPath().toString().replace(/(.+)(\..+)/, "$1" + i + "$2"));
        filePath = newPath;

The script is very good. But problem now:

When menu-tools-extract files then archive.getDownloadLinks() not there.
How get path(s) from manual open?
I need path for case single file (abc.rar or etc) but too for multi file like (abc.001, abc.002) so move can work for manual open too.
Reply With Quote