Walkthru for file renaming ...
-
- Posts: 14
- Joined: Fri Dec 21, 2018 5:00 pm
Walkthru for file renaming ...
Is there a walk thru for file renaming? I have a bunch of irregular named files, that I would like to rename them, into a much more organized format.
I have before, used the "rename" command for this task, but because I do not fully understand the "language", it seems that I lack knowledge, of how to do these sorts of tasks more efficiently than just selecting each and every file, one-by-one to rename.
For example:
What is a more detailed explanation for using the "Old Name" and "New Name" text boxes? When you have a list of file names these boxes now show something in them that is rather a vague representation of what seems to be MSDOS commands.
How do I apply the additional tools to the job by clicking the "right arrow button(s)" which reveals a whole new set of functions? What do the those new functions mean ?
How does explicitly clicking the "Match Case" and "Regex" boxes help my task? Or do I always need too leave them unchecked?
Sorry for being rather uneducated, I have little more than high school basic knowledge.
I have before, used the "rename" command for this task, but because I do not fully understand the "language", it seems that I lack knowledge, of how to do these sorts of tasks more efficiently than just selecting each and every file, one-by-one to rename.
For example:
What is a more detailed explanation for using the "Old Name" and "New Name" text boxes? When you have a list of file names these boxes now show something in them that is rather a vague representation of what seems to be MSDOS commands.
How do I apply the additional tools to the job by clicking the "right arrow button(s)" which reveals a whole new set of functions? What do the those new functions mean ?
How does explicitly clicking the "Match Case" and "Regex" boxes help my task? Or do I always need too leave them unchecked?
Sorry for being rather uneducated, I have little more than high school basic knowledge.
-
- Site Admin
- Posts: 4965
- Joined: Fri Oct 16, 2009 11:31 pm
Re: Walkthru for file renaming ...
There's a little bit about it here:Is there a walk thru for file renaming?
/support/everything/results/#multi-file_renaming
I'll try to go into a bit more detail here..
Please ignore regex and match case for now (leave them off)
Old format and new format define the old filename pattern and new filename pattern.What is a more detailed explanation for using the "Old Name" and "New Name" text boxes?
These two fields are automatically generated, based on the initial filenames.
Depending on the initial filenames, there might not be any noticeable patterns, in which case Everything will use %1 for the old format and new format (%1 on its own will match the entire filename).
%1, %2, %3 have special meaning, these variables capture matched text in the old filenames.
They are essentially a * wildcard (lazily match any character any number of times)
For example, take the following filename:
ABC - 123.txt
If we use old format: %1 - %2
%1 will capture ABC
- will match the literal -
%2 will capture 123.txt
we are essentially searching for: * - *
and storing what * matches in the variables called %1 and %2
we can recall these matches with the new format, for example if we set the new format to
%2 - %1
we would get the following filename:
123.txt - ABC
Changing the "old format" or "new format" will generate new "new filenames".
The "old filenames" and "new filenames" edit boxes allow you to make fine changes that would be difficult with the "old/new format".
Functions can be used on captured text, such as changing case.How do I apply the additional tools to the job by clicking the "right arrow button(s)" which reveals a whole new set of functions? What do the those new functions mean ?
An example would be to convert all filenames to lowercase:
Set old format to %1
Set the new format to $lowercase(%1)
-old format will match everything, the old filename will be captured in %1
-$lowercase(%1) will be replaced with captured filename in %1 in lowercase.
Some more details that might not be clear:
You can change the old filenames text to help match the old format. Everything will keep a copy of the original old filename that it will use for the rename operation.
If you have any questions, maybe a specific multi-file-rename you are trying to do? please let me know.
Here are some examples which may help:
Batch rename jpeg extension to jpg:
All I have done here is remove the e in New format.

Rename some mp3s:
Notice how %1 captures the track, %2 the artist and %3 the title.
All I have done here is add Hackers - to the start of New format.

Enabling regex gives you more control over the pattern matching, instead of capturing with %1 or %2..., regex uses ( and )
Instead of recalling captured groups with %1 and %2 ..., regex uses \1 and \2 ...
regex also replaces all occurrences.
-
- Posts: 132
- Joined: Wed Jun 12, 2013 10:43 pm
Re: Walkthru for file renaming ...
I don't see where the functions for renaming are documented. Are there others besides $lowercase and $uppercase?
-
- Site Admin
- Posts: 4965
- Joined: Fri Oct 16, 2009 11:31 pm
Re: Walkthru for file renaming ...
They are listed when you click the right pointing arrow to the right of the New Format edit.
Currently the function list is:
Currently the function list is:
- $pathpart()
- $strippath()
- $striproot()
- $uppercase()
- $lowercase()
- $titlecase()
-
- Posts: 132
- Joined: Wed Jun 12, 2013 10:43 pm
Re: Walkthru for file renaming ...
This is great. Very useful.
Could you please add the contents of this post to the online help?
Could you please add the contents of this post to the online help?
-
- Site Admin
- Posts: 4965
- Joined: Fri Oct 16, 2009 11:31 pm
Re: Walkthru for file renaming ...
I'll add a dedicated support page with this information.
-
- Posts: 14
- Joined: Fri Dec 21, 2018 5:00 pm
Re: Walkthru for file renaming ...
Thanks for the explanation @void. It helps clarify some mistakes that I was making using the tools.
I had a multi-file, selection of files that were also mixed with .ext named files of different types - i.e. .jpg and .txt in the same folder. My intent was too rename and move these files from arbitrary names too similar named files.
Your note clearly explains this:
Note: multi-file renaming works best when the selected files share similar formats
My effort produced results that were unexpected, so my first reaction was "I do not understand why this result happened", "I only wanted file renaming and file moving".
I really cannot expect a Swiss army knife. Maybe, in time; you could create a software interface for such file manipulation.
I had a multi-file, selection of files that were also mixed with .ext named files of different types - i.e. .jpg and .txt in the same folder. My intent was too rename and move these files from arbitrary names too similar named files.
Your note clearly explains this:
Note: multi-file renaming works best when the selected files share similar formats
My effort produced results that were unexpected, so my first reaction was "I do not understand why this result happened", "I only wanted file renaming and file moving".
I really cannot expect a Swiss army knife. Maybe, in time; you could create a software interface for such file manipulation.
-
- Posts: 2
- Joined: Sun Jun 23, 2019 6:36 am
Re: Walkthru for file renaming ...
These functions are great to use with file-renaming.
I have one question though, about the workings of $titlecase().
Whenever I use $titlecase(%1), then each word gets a capital. I would like the whole variable to be with only the first word getting a capital.
Is there a way to do this ?
For Example:
Kruder & Dorfmeister - Original Bedroom Rockers.flac
The $titlecase(%2) would become "Original bedroom rockers"
I have one question though, about the workings of $titlecase().
Whenever I use $titlecase(%1), then each word gets a capital. I would like the whole variable to be with only the first word getting a capital.
Is there a way to do this ?
For Example:
Kruder & Dorfmeister - Original Bedroom Rockers.flac
The $titlecase(%2) would become "Original bedroom rockers"
-
- Posts: 1584
- Joined: Wed May 24, 2017 9:22 pm
Re: Walkthru for file renaming ...
Not with Everything. In such cases, you are better of with specialized rename utilities like Bulk REname Utility, Advanced Renamer, PFrank, ...
-
- Site Admin
- Posts: 4965
- Joined: Fri Oct 16, 2009 11:31 pm
Re: Walkthru for file renaming ...
Thanks for the suggestions The General.
Adding more functionality to the multi-file renamer in Everything is on my TODO list.
I'll add a sentence case function, eg: $sentencecase(%1)
I'm also working on formatting functions, something like the following is planned:
<upper:<left:%1>,1><lower:<right:%1,len:%1-1>>
Adding more functionality to the multi-file renamer in Everything is on my TODO list.
I'll add a sentence case function, eg: $sentencecase(%1)
I'm also working on formatting functions, something like the following is planned:
<upper:<left:%1>,1><lower:<right:%1,len:%1-1>>
-
- Posts: 2
- Joined: Sun Jun 23, 2019 6:36 am
Re: Walkthru for file renaming ...
Both functions sound really good.void wrote: ↑Wed Jul 10, 2019 9:50 pmThanks for the suggestions The General.
Adding more functionality to the multi-file renamer in Everything is on my TODO list.
I'll add a sentence case function, eg: $sentencecase(%1)
I'm also working on formatting functions, something like the following is planned:
<upper:<left:%1>,1><lower:<right:%1,len:%1-1>>

Ok, we'll have to wait until you find the time.
Thank you for your quick response.