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: Convert case / uppercase, lowercase, etc. #9755

Open
ned-martin opened this issue Feb 17, 2021 · 8 comments
Open

PowerRename: Convert case / uppercase, lowercase, etc. #9755

ned-martin opened this issue Feb 17, 2021 · 8 comments
Labels
Idea-Enhancement New feature or request on an existing product Product-PowerRename Refers to the PowerRename PowerToy

Comments

@ned-martin
Copy link

ned-martin commented Feb 17, 2021

📝 PowerRename: Convert case / uppercase, lowercase, etc.

Add ability to convert case to uppercase/lowercase, etc.

The simplest solution I feel would be to use regex-style matching, with some special syntax to indicate case conversion:

For example:
Match: (.*) is a (.*)
Replace: $lowercase($1) is a $uppercase($2)

Match: "THIS is a test."
Result: "this is a TEST"

@ned-martin ned-martin added the Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams label Feb 17, 2021
@Aaron-Junker
Copy link
Collaborator

Duplicate of #3335

@Aaron-Junker Aaron-Junker marked this as a duplicate of #3335 Feb 17, 2021
@Aaron-Junker Aaron-Junker added Idea-New PowerToy Suggestion for a PowerToy Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. labels Feb 17, 2021
@ned-martin
Copy link
Author

ned-martin commented Feb 17, 2021

This is not a duplicate.

#3335 refers to using keyboard manager - that is a totally different tool. This ticket refers to using Power Rename to allow a far more flexible method of changing case of filenames - potentially many at once. This is not something keyboard manager could do. This is something many other similar tools already do, but it would be good to have the convenience of doing so from Power Rename

@Aaron-Junker Aaron-Junker reopened this Feb 17, 2021
@Aaron-Junker Aaron-Junker added Product-PowerRename Refers to the PowerRename PowerToy and removed Idea-New PowerToy Suggestion for a PowerToy labels Feb 17, 2021
@crutkas crutkas added Idea-New PowerToy Suggestion for a PowerToy Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. Product-PowerRename Refers to the PowerRename PowerToy Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Feb 18, 2021
@crutkas
Copy link
Member

crutkas commented Feb 18, 2021

Can you provide clear scenario(s) where this style conversion would be used when renaming a file? I just want to be sure we understand the 'why'.

The what is clear now, just not the why this style renaming is critical

@crutkas crutkas added Idea-Enhancement New feature or request on an existing product Product-PowerRename Refers to the PowerRename PowerToy and removed Idea-New PowerToy Suggestion for a PowerToy labels Feb 18, 2021
@ned-martin
Copy link
Author

ned-martin commented Feb 19, 2021

To be honest I find this to be a really unusual thing to say. Why does a user want to rename their files? Who knows? Who cares? Point is, they do? Is it critical that they can rename their files? I guess that is up to the user? Given that this software's entire purpose is for renaming files, I feel like renaming files is critical to this software!

Anyway, if you want some "clear scenario(s)" where this could be used, here's a few that I've had recently:

1

I have a folder full of files with machine-generated file names like "dd_response_type_surface_activation_report_0183. I want to convert all these files to a more human/manager friendly format, including proper letter casing - something that looks more professional, like "DD - Response Type - Surface - Activation report 0183".

2

I have a folder full of files with random file names. They are going to be used on a case-sensitive linux-based web application. I want to replace all spaces with -, & with "-and-", and make everything lowercase.

I could go on - there's heaps of reasons a user might want to change the case of filenames, and being able to do it using regex gives a lot of power to be able to do it in quite complex ways. I have other regex file renaming software installed which can do all of this (and far more), but for simple stuff, it would be easier and quicker to do it using PowerRenamer, so I think it would be a good feature for the software to have.

@ghost ghost added Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Needs-Team-Response An issue author responded so the team needs to follow up and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Feb 19, 2021
@ned-martin ned-martin changed the title Convert case / uppercase, lowercase, etc. PowerRename: Convert case / uppercase, lowercase, etc. Feb 19, 2021
@crutkas
Copy link
Member

crutkas commented Feb 19, 2021

Without understanding scenarios, we guess at what golden paths are for success. What is asked for and what we think you asked for could differ.

I always think of "The Homer" episode when Homer builds a car.

@crutkas crutkas removed Needs-Team-Response An issue author responded so the team needs to follow up Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Feb 19, 2021
@swisszeni
Copy link

I just now have an occasion where this feature would be useful and came across this issue.
We need to rename some files with that have (along other info) the name of a month in the file name. The casing for the month is all over the place. Would have been handy if PowerToys would allow for modifiers in the replace field (like \L$1 ). Since I'm using RegEx for capturing, the same syntax seems suitable for the output.

@osirisgothra
Copy link

osirisgothra commented Mar 14, 2022

I realize there is the titlecase/uppercase/lowercase/etc buttons on the bottom, but, you cant get specific-er than that, plus its far more natural since most text editors that handle regex replacements would implement it this way. I think a $L and $U would be good since there is already $1 $2 etc (plus \ is a path separator in windows, so trying to avoid its use).

I second, third, and fourth that, I often need to correct casing in filenames, especially when Unix subsystem is involved, where files need to have the correct case so that when they are moved over, etc. Also, changing files to make them readable like when a file is named 'some_ugly_filename.txt' to 'Some Ugly Filename.txt' or when i end up with a bunch of THUMBS.DB, CONFIG.INI or CACHE.FILE and want them to be lowercase or proper case... it goes on and on (marketing rule of thumb: 1 person voices their opinion for every 100 that don't)

@orbit-loona
Copy link

orbit-loona commented Mar 3, 2023

Someone who knows how to code please do something about this. At least \u and \l ($u and $l?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Idea-Enhancement New feature or request on an existing product Product-PowerRename Refers to the PowerRename PowerToy
Projects
Status: No status
Development

No branches or pull requests

7 participants