by Admin » Sat Sep 06, 2025 1:59 am
Yes — this is possible with Bulk Rename Utility. You can parse the date/time out of each filename and set the file timestamps (Created/Modified/Accessed) to that value; you can also (optionally) propagate those timestamps into the file's EXIF "Date Taken" where supported.
Recommended approach (safe, test on a copy first)
1. Make a backup or work on a copy of a few files to test.
2. Preview first - the file list New Name column and a small test run are your friend.
Two ways: quick manual (limited), or reliable per-file automatic (recommended)
A. Quick/manual (if all files share the same single date)
- Special -> Change File Timestamps lets you set a fixed Created/Modified/Accessed date (or Current) or apply a Delta. Not suitable when each file needs a different timestamp extracted from its filename.
B. Automatic/per-file (recommended) — use JavaScript renaming
- Use the integrated JavaScript engine (Special (14) -> Javascript) to:
- Parse the timestamp from the filename (your example shows leading YYYYMMDDhhmmss_).
- Build a JavaScript Date from the components.
- Assign that Date to newCreated and/or newModified (these are provided variables — BRU will apply those timestamps).
- Leave the filename unchanged (or change it if you want).
Sample JavaScript to paste into Special -> Javascript (adjust if your filename pattern differs):
// filenames like: 20220917130620_IMG_2167
// name is the file name without extension (BRU variable)
var m = name.match(/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/);
if (m) {
// m[1]=YYYY, m[2]=MM, m[3]=DD, m[4]=hh, m[5]=mm, m[6]=ss
var dt = new Date(
parseInt(m[1],10),
parseInt(m[2],10) - 1, // JS months 0..11
parseInt(m[3],10),
parseInt(m[4],10),
parseInt(m[5],10),
parseInt(m[6],10)
);
// Set both Created and Modified to this date/time
newCreated = dt;
newModified = dt;
// keep filename unchanged
newName = name;
} else {
// no match: leave unchanged (or handle error)
newName = name;
}
Notes and options
- Timezones: JavaScript Date uses local timezone. If your timestamps are in UTC or another zone, adjust accordingly (e.g., use Date.UTC(...) then newCreated = new Date( Date.UTC(...)) or add/subtract offset).
- EXIF "Date Taken": Bulk Rename Utility can write EXIF Date Taken from the file Created or Modified timestamps. After the timestamps are changed, enable the option in the Special menu that says something like "Exif Date Taken (Original) / Item Date set to change the value of the Exif Date Taken to the file Created Timestamp or Modified Timestamp" so the EXIF tag is updated. (EXIF writing is only available for supported image formats.)
- Supported image EXIF write/read: JPG/JPEG/TIFF/NEF/CR2 and the other formats listed in the EXIF docs. If a file type does not support EXIF, that step will do nothing for that file type.
- Test on a few files first, use Preview, and only run on the full set when you’re happy.
- If you want to remove the leading date from the filename after using it to set timestamps, you can set newName accordingly in the script (e.g., newName = name.replace(/^\d{14}_?/, '')).