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

FR: command to recursively lowercase a directory tree/file on the default cheats #842

Open
i30817 opened this issue May 27, 2023 · 1 comment
Labels
new feature New feature or request

Comments

@i30817
Copy link

i30817 commented May 27, 2023

Is your feature request related to a problem? Please describe.
Yes. This is sooooo common when interacting with data that comes from windows/DOS that needs to be massaged for unix utilities/programs and it's always annoying remembering it.

Describe the solution you'd like
Something like

find <chooser> -depth -exec rename 's/(.*)\/([^\/]*)/$1\/\L$2/' {} \;

But safer in that if there are files that would be clobbered (because there are mixed case files, some of which that would end up the 'saved over') it refuses to progress and just presents a list of files that could be clobbered for the user to manually fix. So two passes.

Also a 'non-interactive' version for scripts where a strategy to deal with conflicts is selected (most recent probably, if there doesn't need to be more configuration).

I'd also like it if the interactive version tested for required sudo (besides case conflicts) and asked for it if necessary i guess.

Describe alternatives you've considered
I usually just 'remember' the command and invoke it, but i'd appreciate a way to use some kind of filechooser (if possible), and if not use $PWD and at least make sure that files wouldn't be clobbered by the operation. I usually don't care about race conditions on this because it's usually data that is not being operated on by programs, and in most cases it's going to be read only anyway (usually games).

@i30817 i30817 added the new feature New feature or request label May 27, 2023
@i30817 i30817 changed the title FR: two commands to recursively lowercase and uppercase a directory tree/file FR: two commands to recursively lowercase and uppercase a directory tree/file on the default cheats May 27, 2023
@i30817 i30817 changed the title FR: two commands to recursively lowercase and uppercase a directory tree/file on the default cheats FR: command to recursively lowercase a directory tree/file on the default cheats May 29, 2023
@i30817
Copy link
Author

i30817 commented May 29, 2023

edited the RFE to focus on the 'to lowercase' interesting case and to ask for a second version that is suited for non-interactive scripts which has a 'autoresolve' capability when there is a conflict lowercasing instead of a 'stop progressing if there would be clobbering' of the default version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant