View Single Post
  #2573  
Old 01.03.2023, 16:56
perspicacia perspicacia is offline
JD Beta
 
Join Date: Nov 2015
Posts: 57
Default

Quote:
Originally Posted by mgpai View Post
This script will replace the characters just before they are added to linkgrabber list. If you want to replace them after they are added to JD, you will have to use a different script with context-menu button pressed trigger.

Code:
/*
    Replace space with underscore in filenames
    Trigger : Packagizer Hook
*/

try {
    if (state == "BEFORE") {
        link.setName(link.name.replace(/\s/g, "_"));
    }
} catch (e) {};
How do I adapt this to change all underscores "_" to "." in a filename

Thanks no need to answer this now as I have worked out for myself

Last edited by perspicacia; 05.03.2023 at 00:59. Reason: Worked out the solution myself
Reply With Quote