Swip-Swapping Elements of File Name
Moderators: white, Hacker, petermad, Stefan2
-
- Junior Member
- Posts: 61
- Joined: 2018-03-28, 20:13 UTC
Swip-Swapping Elements of File Name
I feel like I read how to do this somewhere, when I didn't need to know how to do this. And now that I do, I can't find it!
What I want to do, is take parts of what's at the end of a batch of file names, and put it at the beginning.
I have a bunch of files that were named
[Account Name] File Name.xlsx
And a bunch that were named
Account Name - File Name.xlsx
And more that were named
File Name (Account Name).xlsx
I'm pretty confident in my skills to clean up the first two. But how can I tell the system to tTake everything that 's in parentheses and move it to the front of the file name?
Does that make sense?
Thanks
What I want to do, is take parts of what's at the end of a batch of file names, and put it at the beginning.
I have a bunch of files that were named
[Account Name] File Name.xlsx
And a bunch that were named
Account Name - File Name.xlsx
And more that were named
File Name (Account Name).xlsx
I'm pretty confident in my skills to clean up the first two. But how can I tell the system to tTake everything that 's in parentheses and move it to the front of the file name?
Does that make sense?
Thanks
Dan: You're gonna need to get someone to fix my computer.
Kim: What's wrong with it?
Dan: It's in several pieces on my floor.
Kim: What's wrong with it?
Dan: It's in several pieces on my floor.
Re: Swip-Swapping Elements of File Name
How did you solve the first two?
Re: Swip-Swapping Elements of File Name
If you want to rename files, you should do as follows:
1. Select all files with the same pattern, for example *(*).xls*. You can use F7 to find them on all partitions, or Ctrl+B to see all files in "Documents" subfolders.
2. For selected files use Multi-Rename Tool (Ctrl+M), possibly with regular expressions. I won't tell you the exact solution for your case, you should better learn how to do it on your own – it's really powerful tool and you will probably use it many times in the future.
Andrzej P. Wozniak
Polish subforum moderator
Polish subforum moderator
-
- Junior Member
- Posts: 61
- Joined: 2018-03-28, 20:13 UTC
Re: Swip-Swapping Elements of File Name
Yeah, see, I'm USING Multi-Rename, and can't make heads or tails of the documentation. I appreciate the "jump in, kid, and if you can swim out, cool, otherwise you'll be like your poor departed Uncle Fred" approach, but, um, I wouldn't ask for help if I didn't need... help.
Stefan - I wasn't totally clear. The desired output is "Account Name File Name", so I do know how to clean that up in MultiRename. It's the swip-swapping that I keep fouling up.
Light a man a fire, keep him warm for a night.
Light a man afire, keep him warm for a lifetime I always say!
Stefan - I wasn't totally clear. The desired output is "Account Name File Name", so I do know how to clean that up in MultiRename. It's the swip-swapping that I keep fouling up.
Light a man a fire, keep him warm for a night.
Light a man afire, keep him warm for a lifetime I always say!
Dan: You're gonna need to get someone to fix my computer.
Kim: What's wrong with it?
Dan: It's in several pieces on my floor.
Kim: What's wrong with it?
Dan: It's in several pieces on my floor.
Re: Swip-Swapping Elements of File Name
Then it is just to learn the wonderful world of Regex
In search and replace, check the RegEx box and specify as follows.
Search for:
(.*) \((.*)\)
Replace with:
$2 - $1
If you want a fast summary, .* stands for many of any character ( and ) is used to group them (to be used in the reply). Then at last \( is the parenthesis to search for, but with an escape character, so it will not be confused with the groping characters.
The result the just takes the second matched () adds a dash and then the first match.
Br
In search and replace, check the RegEx box and specify as follows.
Search for:
(.*) \((.*)\)
Replace with:
$2 - $1
If you want a fast summary, .* stands for many of any character ( and ) is used to group them (to be used in the reply). Then at last \( is the parenthesis to search for, but with an escape character, so it will not be confused with the groping characters.
The result the just takes the second matched () adds a dash and then the first match.
Br
Re: Swip-Swapping Elements of File Name
2Alonzo Mosley
Then you should replace with $2 $1 not with $2 - $1The desired output is "Account Name File Name"
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
-
- Junior Member
- Posts: 61
- Joined: 2018-03-28, 20:13 UTC
Re: Swip-Swapping Elements of File Name
Think I have it, thanks. Still not totally understanding it, but... I don't have to understand Bernoulli's principle to catch a flight to O'Hare, either.
Thanks.
BTW: This made me laugh:
Thanks.
BTW: This made me laugh:
obeg wrote:Search for:
(.*) \((.*)\)
obeg wrote:...the groping characters
Dan: You're gonna need to get someone to fix my computer.
Kim: What's wrong with it?
Dan: It's in several pieces on my floor.
Kim: What's wrong with it?
Dan: It's in several pieces on my floor.
Re: Swip-Swapping Elements of File Name
Totally unintentional, but kind of funny now that I see it.Alonzo Mosley wrote: BTW: This made me laugh:obeg wrote:Search for:
(.*) \((.*)\)obeg wrote:...the groping characters
Guess I have to tweak the spellchecker before some gets offended...