Help needed: Using Bulk Rename Utility to update file timest

Bulk Rename Utility How-To's

Help needed: Using Bulk Rename Utility to update file timest

Postby jeff_rod » Mon Jul 10, 2023 11:24 pm

Hello everyone,

I'm currently using the Bulk Rename Utility and I'm wondering if there's a way to leverage the program's capabilities to read the filename and use the first 8 characters, which I've formatted as "yyyymmdd" (e.g., 20230101), to create a new timestamp for the file.

I have a large collection of files with names in the format "yyyymmdd-description.ext" (e.g., 20230101-report.pdf), and I would like to update the file timestamps (Created, Modified, and Accessed) based on the date provided in the filename.

Is there a feature or command within the Bulk Rename Utility that can help me achieve this? I would greatly appreciate any guidance or examples on how to accomplish this task efficiently using the program.

Thank you in advance for your assistance!

Best regards,
Jefferson Rodrigo
jeff_rod
 
Posts: 4
Joined: Mon Jul 10, 2023 11:23 pm

Change date-stamps from filename

Postby Luuk » Mon Jul 10, 2023 11:40 pm

Luuk
 
Posts: 706
Joined: Fri Feb 21, 2020 10:58 pm

Change date-stamps from filename

Postby Luuk » Tue Jul 11, 2023 1:23 am

Many apologies, Im just noticed that your date-formats is different from the other poster!
So if willing to use the command-line exiftool.exe, then your command to look more like...

Code: Select all
"C:\Path\To\exiftool.exe" -r -fast4 -overwrite_original -if "$filename=~/^20\d\d(0[1-9]|1[012])[0-3]\d-/" -File:System:Time:All"<${filename;s/^(....)(..)(..)-.*/$1:$2:$3 00:00:00/}"  "C:/PathTo/YourFolder"

After getting the date from $filename, it just uses 00:00:00 for the time.
Also, should remove the -r unless wanting exiftool to recurse through directories?
Luuk
 
Posts: 706
Joined: Fri Feb 21, 2020 10:58 pm

Re: Help needed: Using Bulk Rename Utility to update file timest

Postby jeff_rod » Tue Jul 11, 2023 12:44 pm

Thanks a lot, I looked for it and couldn't find it. I will read it calmly and tena as soon as possible. Again thanks for the help.
jeff_rod
 
Posts: 4
Joined: Mon Jul 10, 2023 11:23 pm

Re: Help needed: Using Bulk Rename Utility to update file timest

Postby jeff_rod » Wed Jul 12, 2023 2:31 pm

Hello, thank you for your previous help. However, I was unable to follow the procedure here. I tried using the exiftool.exe tool and attempted to use the executable mode, but it only displayed the information and closed the window whenever I pressed any key, preventing me from being able to paste the code you provided. I also tried placing it in the C:\Windows directory as I saw on their website to access it through the CMD, but without success. Is there any way for me to send a screenshot or something similar? I also searched for videos on YouTube, but couldn't find any that helped me.
jeff_rod
 
Posts: 4
Joined: Mon Jul 10, 2023 11:23 pm

Change date-stamps from filename

Postby Luuk » Thu Jul 13, 2023 12:51 am

Yes, it doesnt matter which folders to settle your exiftool, but it should be named exiftool.exe
Then after editing both "C:\Paths", just copy/paste your command into the command window.
If still its not working, should paste the command that's not working?
Luuk
 
Posts: 706
Joined: Fri Feb 21, 2020 10:58 pm

Re: Help needed: Using Bulk Rename Utility to update file timest

Postby jeff_rod » Sat Jul 15, 2023 12:24 pm

Hello, sorry for the delay. So here, I don't even get the option to enter a command. If I don't rename the program, it shows the information, but if I press Enter, it closes. If I rename it to exiftool.exe and try to drag and drop an image, it opens briefly and then closes. If I simply try to open the program, the readme file is displayed. I recorded a video here, I'm not sure if the forum will allow it, but I uploaded it to YouTube to show you:https://www.youtube.com/watch?v=LB3OrUsCLPI.
jeff_rod
 
Posts: 4
Joined: Mon Jul 10, 2023 11:23 pm

Change date-stamps from filename

Postby Luuk » Sat Jul 15, 2023 4:42 pm

The problem is that you never open any command-prompt, so cannot enter any commands.
It does look like, that instead you are just dragging files onto the icon named exiftool(-k).
Ways to open a command-prompt: http://www.wikihow.com/Open-the-Command-Prompt-in-Windows

If instead, you prefer not typing any commands?? Can always just make a batch like...

@echo off
"C:\Path\To\exiftool.exe" -r -fast4 -overwrite_original -if "$filename=~/^20\d\d(0[1-9]|1[012])[0-3]\d-/" -File:System:Time:All"<${filename;s/^(....)(..)(..)-.*/$1:$2:$3 00:00:00/}" "C:/PathTo/YourFolder"
echo done
pause>nul

After editing both paths, and deciding if to recurse, then save it with either the .bat or .cmd extension.
So then, clicking on this batch will conduct the timestamps, when your filenames is like the description.
Luuk
 
Posts: 706
Joined: Fri Feb 21, 2020 10:58 pm


Return to How-To