Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PowerRename] Insert String in Position x #1585

Open
drfuture opened this issue Mar 15, 2020 · 19 comments
Open

[PowerRename] Insert String in Position x #1585

drfuture opened this issue Mar 15, 2020 · 19 comments
Labels
Issue-Docs Documentation issue that needs to be improved Product-PowerRename Refers to the PowerRename PowerToy

Comments

@drfuture
Copy link

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
Copy link
Member

crutkas commented Mar 17, 2020

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

@crutkas crutkas added Idea-Enhancement New feature or request on an existing product Product-PowerRename Refers to the PowerRename PowerToy labels Mar 17, 2020
@drfuture
Copy link
Author

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
Copy link
Member

crutkas commented Mar 18, 2020

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

@enricogior enricogior changed the title PowerRename: Insert String in Position x [PowerRename] Insert String in Position x Feb 9, 2021
@PwrSrg
Copy link

PwrSrg commented Feb 19, 2021

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

@crutkas
Copy link
Member

crutkas commented Feb 19, 2021

@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
Copy link

PwrSrg commented Feb 19, 2021

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
Copy link

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 #1585 (comment) 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
Copy link
Collaborator

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

  • Search: ^(.{n})(.*) or (.*)(.{n})$ respectively (where n is number of chars)
  • Replace: $1+$2 where + is the inserted character

(ref: #685)

@Jay-o-Way
Copy link
Collaborator

Would be a fine example for the documentation though.

@Jay-o-Way Jay-o-Way added the Issue-Docs Documentation issue that needs to be improved label Jul 22, 2022
@Jay-o-Way
Copy link
Collaborator

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

@AlexisDemongeot
Copy link

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
Copy link
Collaborator

@AlexisDemongeot this issue is about something else

@Jay-o-Way Jay-o-Way added Resolution-Won't fix and removed Idea-Enhancement New feature or request on an existing product labels Sep 14, 2022
@dominik-ba
Copy link

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
Copy link
Collaborator

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
Copy link

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
Copy link
Collaborator

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

@carrgilson
Copy link

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
Copy link

AlexisDemongeot commented Nov 2, 2022

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
Copy link
Collaborator

Jay-o-Way commented Nov 2, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Docs Documentation issue that needs to be improved Product-PowerRename Refers to the PowerRename PowerToy
Projects
None yet
Development

No branches or pull requests

8 participants