4.1.0.1 Erroneous "Rename" usage on UI

Post any Bulk Rename Utility support requirements here. Open to all registered users.

4.1.0.1 Erroneous "Rename" usage on UI

Postby chrisjj » Wed Mar 18, 2026 4:00 pm

When I use a JS script (e.g. below) below to set Modified with no renaming, I get e.g.

Image

containing three erroneous references to rename/filename. Please change to e.g. process.

Thanks.

Code: Select all
// Example:
// name = "2020-03-18 13h45 Report.pdf"
// After: filename remains "2020-03-18 13h45 Report.pdf", modified date set to 2020-03-18 13:45
// Example placeholder time:
// name = "2020-03-18 __h__ Notes.txt"
// After: filename remains unchanged, modified date set to 2020-03-18 00:00

// try to extract date and time
var match = name.match(/^(\d{4})-(\d{2})-(\d{2})\s+(\d{1,2})h(\d{2})/);
var year, month, day, hour, minute;
if (match) {
    // full time present
    year   = parseInt(match[1], 10);
    month  = parseInt(match[2], 10) - 1; // JS months are zero-based
    day    = parseInt(match[3], 10);
    hour   = parseInt(match[4], 10);
    minute = parseInt(match[5], 10);
} else {
    // try placeholder "__h__"
    match = name.match(/^(\d{4})-(\d{2})-(\d{2})\s+__h__/);
    if (match) {
        year   = parseInt(match[1], 10);
        month  = parseInt(match[2], 10) - 1;
        day    = parseInt(match[3], 10);
        hour   = 0;
        minute = 0;
    }
}
// if we found a date, set the modified timestamp
if (match) {
    newModified = new Date(year, month, day, hour, minute, 0);
}
// keep the filename unchanged
newName = name;
chrisjj
 
Posts: 124
Joined: Wed Mar 30, 2011 5:26 pm

Re: 4.1.0.1 Erroneous "Rename" usage on UI

Postby chrisjj » Wed Mar 18, 2026 7:36 pm

And at:

Image
chrisjj
 
Posts: 124
Joined: Wed Mar 30, 2011 5:26 pm

Re: 4.1.0.1 Erroneous "Rename" usage on UI

Postby chrisjj » Wed Mar 18, 2026 7:46 pm

Plus that Elapsed time is inaccurate. True value is under 1s.
chrisjj
 
Posts: 124
Joined: Wed Mar 30, 2011 5:26 pm

Re: 4.1.0.1 Erroneous "Rename" usage on UI

Postby chrisjj » Wed Mar 18, 2026 7:46 pm

Plus that Elapsed time is inaccurate. True value is under 1s.
chrisjj
 
Posts: 124
Joined: Wed Mar 30, 2011 5:26 pm


Return to BRU Support