So it's easy to rename photos imported from a camera using names based on date/time of the photo, allow a common file attribute to be chosen in the PowerRename dialog (e.g. a drop-down allowing selection of date attributes the selected files have in common), at minimum "Date created" or "Date modified" or "Date taken", and then date/time components of the per-file attribute values made available in the "Replace with" expression by variables identifying date/time component, from year to millisecond resolution (e.g. $YYYY, $YY, $MM, $DD, $hh, $mm, $ss, $S, $SS, $SSS, etc.
(You could use a different design, but I think the key thing is attributes, components must be chosen, positioned, and delimited by the user as needed, and choice of component down to millisecond precision is often needed for sports photography.)
For example a set of photos named _DSC_2235.JPG_, _DSC_0001.JPG_, and _DSC_0002.JPG_, originally taken in that order, which would collide by name with photos exported from other sessions or other cameras, and even within this set don't have meaningful names for sorting due to a rollover, need to be renamed. The result should be _Redmond-Tournament-2019-11-23-070123-353.jpg_, _Redmond-Tournament-2019-11-23-070123-735.jpg_, and _Redmond-Tournament-2019-11-23-070215-102.jpg_ using a pattern like Redmond-Tournament-$YYYY-$MM-$DD-$hh$mm$ss-$SSS.jpg.
If the "Replace with" expression would result in a name collision, this should be indicated by the dialog, rather than allowing rename to proceed.
The "Help" button should provide information about possible patterns. Such help should also be easily accessible from the date attribute selection.
Might consider replacing issue #591 with this, as I believe it's what @gityta was asking for but without the discussion digression into regex. I've also added necessarily detail about precision needed.
Yes, that's what I was requesting in #591
Other people suggested that regex was the answer -- it isn't -- and that's what derailed my thread. I tried to pull it back and it got derailed again. I think my last post finally got it back on track, but you've said it well here.
Please do this! Being able to rename image files based off the date taken metadata would be a life saver.
One suggestion, could it also have a collision parameter as well, so in the cases where collisions are encountered suffixes can be added such as "-##" equating to "-01", "-02" etc, however only included if there are collisions. This is for cases where I would like to keep the filenames tidy and rename images to the minute and second, however may have a number of burst images in a set so need a millisecond or incrementing integer suffix just for those.
One questions, how to deal with files that do not have the meta-data? perhaps the UI could present an "or" options that gets appending instead of the date pattern.
This feature is a must for a file renamer. Without it, the renamer lacks its so called POWER and is completely useless for my needs.
One suggestion, could it also have a collision parameter as well, so in the cases where collisions are encountered suffixes can be added such as "-##" equating to "-01", "-02" etc, however only included if there are collisions. This is for cases where I would like to keep the filenames tidy and rename images to the minute and second, however may have a number of burst images in a set so need a millisecond or incrementing integer suffix just for those.
As long as the files are also ordered by the chosen date attribute when adding suffixes like this, that would work well. e.g. "I want only date/hour/minute in my file names, and I want files to be in order taken when I sort by filename after renaming. In the case I took many photos within a minute, or even a second, I expect this still."
It might also be helpful to be able to use the file's existing name attribute in the pattern, although I think that's a feature of its own, since it probably involves pattern recognition within the filename. (E.g. to remove "DSC" from every name.) I want to keep this enhancement about date/time metadata as much as possible.
We need to prepare an update for https://github.com/microsoft/PowerToys/wiki/PowerRename-Overview to describe the new feature.
We need to prepare an update for https://github.com/microsoft/PowerToys/wiki/PowerRename-Overview to describe the new feature.
I haven't seen that this feature is implemented yet. Am I missing something?
@gityta
it will be released in 0.20.
To briefly describe the feature;
Now file's creation date and time attributes can be used while renaming. Simply use variable pattern in Replace with text area according to the table to retrieve related info from files attributes.
Assume a file is created at 20.07.2020 19:30:32:125
|Attribute|Usage|Retrieved value
|---|:---:|:---:|
|Year|$YYYY|2020
|Month|$MM|07
|Day|$DD|20
|Hours|$hh|19
|Minutes|$mm|30
|Seconds|$ss|32
|Milliseconds|$fff|125
why is there a draft PR here to this. @enricogior
Because we want to improve it and the code was not yet ready for 0.20.
This is my first review of this thread since there was some dev activity. I'm concerned that unless the implementation allows choice of date/time attribute of the file (from the issue, "at minimum "Date created" or "Date modified" or "Date taken"") the photography scenario described may sometimes not be possible with this tool.
Looking at some of the photos I've taken, "Date created" is the time the photo was transferred to a PC, largely meaningless, vs "Date modified" which happens to be the time the photo was taken, and "Date taken" which is not set. I think I would want to be able to choose "Date modified" in that case.
@waded
can you please open a new issue for the "Date created" or "Date modified" or "Date taken" option?
Thank you.
Added documentation to the wiki for the date replace notation https://github.com/microsoft/PowerToys/wiki/PowerRename-Overview
@waded
do you need to switch between date created and data modified/taken when renaming the files or should be good enough to have an option in the Settings to choose the default one? I'm asking because the current rename dialog is already crowded and we would prefer to not add more stuff there if not strictly needed.
Most helpful comment
Please do this! Being able to rename image files based off the date taken metadata would be a life saver.
One suggestion, could it also have a collision parameter as well, so in the cases where collisions are encountered suffixes can be added such as "-##" equating to "-01", "-02" etc, however only included if there are collisions. This is for cases where I would like to keep the filenames tidy and rename images to the minute and second, however may have a number of burst images in a set so need a millisecond or incrementing integer suffix just for those.
One questions, how to deal with files that do not have the meta-data? perhaps the UI could present an "or" options that gets appending instead of the date pattern.