microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
109.66k stars 6.46k forks source link

[PowerRename] Insert String in Position x #1585

Open drfuture opened 4 years ago

drfuture commented 4 years ago

Would be nice to have a option to insert a string on Position x from start / end because at the moment its imposible? to make a prefix / suffix on all files of a directory?

there is a other request to have variables to be set / used for renaming - maybe this could be used to insert a string on a free position too.

For example: Search-Field: {Var1}{OriginalFilename} Replace: {Var1}="xxxx"

Or Search-Field: {OriginalFilename|-5}{Var1}{DateTime}

And have a nice "Tagging-List like" GUI with default Variables like Filename, FileCreationDate, FileChangeDate, Exif... etc.

crutkas commented 4 years ago

You can do some of this right now with RegEx. For features, i really need to better understand targeted use cases as that drives a lot of implementation.

https://github.com/microsoft/PowerToys/tree/master/src/modules/powerrename#regular-expressions

image

drfuture commented 4 years ago

Hi, ok i i had not the idea to use maching-groups / variables. i used regex some times - but for validating or matching and it was not intuitiv for me to use regex in that case to prepend some text.

So the Subject is not 100% Correct any more - the rest of my post was the Idea of a maybe better Gui hat could be used from people that not aware of regex and have the space to extend the funktionality to use much more search>replace strings that could be extraced from the files that are going to be renamed.

if you like i could create a mockup with Fluend-UI and the Idea with the "tagging interface".

crutkas commented 4 years ago

please do. Issue #888 is our tracking issue for actual updating the UX for rename.

PwrSrg commented 3 years ago

So WHICH issue is tracking EXIF data? THIS one (#1585), or #9700?

crutkas commented 3 years ago

@PwrSrg the description directly calls out EXIF as vars

And have a nice "Tagging-List like" GUI with default Variables like Filename, FileCreationDate, FileChangeDate, Exif... etc.

PwrSrg commented 3 years ago

To clarify:

We would like the addition of EXIF Data attributes to the existing list of available renaming variable patters as described in the HELP documentation under "Replace using file creation date and time":

https://docs.microsoft.com/en-us/windows/powertoys/powerrename

Since ALL of these patterns are directly related to file creation date and time, EXIF Data would most likely be it's own section:

Replace using image EXIF data The EXIF data attributes of an image can be used in the Replace with text by entering a variable pattern according to the table below.

Variable pattern | Explanation $exif_YYYY | Year Taken represented by a full four or five digits, depending on the calendar used. $exif_YY | Year Taken represented only by the last two digits. A leading zero is added for single-digit years. $exif_Y | Year Taken represented only by the last digit. $exif_MMMM | Name of the month $exif_MMM | Abbreviated name of the month $exif_MM | Month Taken as digits with leading zeros for single-digit months. $exif_M | Month Taken as digits without leading zeros for single-digit months. $exif_DDDD | Name of the day of the week $exif_DDD | Abbreviated name of the day of the week $exif_DD | Day of the month as digits with leading zeros for single-digit days. $exif_D | Day of the month as digits without leading zeros for single-digit days. $exif_hh | Hours with leading zeros for single-digit hours $exif_h | Hours without leading zeros for single-digit hours $exif_mm | Minutes with leading zeros for single-digit minutes. $exif_m | Minutes without leading zeros for single-digit minutes. $exif_ss | Seconds with leading zeros for single-digit seconds. $exif_s | Seconds without leading zeros for single-digit seconds. $exif_fff | Milliseconds represented by full three digits. $exif_ff | Milliseconds represented only by the first two digits. $exif_f | Milliseconds represented only by the first digit.

carrgilson commented 3 years ago

Pulling in from #10381:

I would like the addition of ID3 data attributes to the existing list of available renaming variable patters as described in the HELP documentation under "Replace using file creation date and time":

https://docs.microsoft.com/en-us/windows/powertoys/powerrename#replace-using-file-creation-date-and-time

Replace using image ID3 data The ID3 data attributes of an MP3 can be used in the Replace with text by entering a variable pattern.

Specifically thinking about the text information frames listed here: https://id3.org/id3v2.3.0#Text_information_frames

As per the suggestion in https://github.com/microsoft/PowerToys/issues/1585#issuecomment-782204716 regarding EXIF data, please see the to the table below for a limited number of examples.

Variable pattern | Explanation $ID3.TRCK | Track number $ID3.TIT2 | Title $ID3.TOPE | Artist $ID3.TALB | Album title

Jay-o-Way commented 2 years ago

I think there could be countless of specifics like these and including them all would require a lot (= too much) visual controls. For those who wonder, inserting at start or end should be possible with

(ref: #685)

Jay-o-Way commented 2 years ago

Would be a fine example for the documentation though.

Jay-o-Way commented 2 years ago

Also think about what happens if more like these are added to the GUI and one conflicts with another..?

AlexisDemongeot commented 2 years ago

Hello, Is PowerRename still unable to rename files in fonction of EXIF datas ? It's to rename pictures files fonction of camera date type AAAAMMDD HHMMSS.

Thanks for your answer.

Jay-o-Way commented 2 years ago

@AlexisDemongeot this issue is about something else

dominik-ba commented 1 year ago

Although the content mentions exif etc. the title of this issue is completely missleading if this is the one issue which should be used to follow if we want to use metadata in the filename. maybe a rename to use exif, metadata, properites, ... would be nice? I would really like to have this feature :)

Jay-o-Way commented 1 year ago

The title is about "insert string in position x" and that is what this issue should be about. Comments have gone a bit off-topic, I suppose.

dominik-ba commented 1 year ago

But in that case, the collaborators/moderators should align. There are many "this issue was referenced in XYZ" which are about properties but they are all closed in favor of this one...

Jay-o-Way commented 1 year ago

I'll take this (issue title & subject) along in our next meeting

carrgilson commented 1 year ago

I'll take this (issue title & subject) along in our next meeting

Thank you @Jay-o-Way, mine was one of those issues #10381 that was closed in favour to this one, so I'd like to see this progressed.

AlexisDemongeot commented 1 year ago

There are many "this issue was referenced in XYZ" which are about properties but they are all closed in favor of this one...

Hello, that's exactly that. All of issues mentionning EXIF or other metadatas in order to rename have been closed. That's the only thread which still mention that possibilities.

@Jay-o-Way, I apologize for posting in a wrong thread.

Jay-o-Way commented 1 year ago

It's not that black/white. It's mentioned at the very end (of the first comment) as a quick example. Asking @crutkas and @enricogior to: either clarify/rewrite the main issue (title and text), or reopen issue #9700 (which is very targeted) and update the redirections.

PS my promise about the meeting was too optimistic.