Everything, Multi-Rename !regex: AND %

General discussion related to "Everything".
Post Reply
therube
Posts: 5056
Joined: Thu Sep 03, 2009 6:48 pm

Everything, Multi-Rename !regex: AND %

Post by therube »

Everything, Multi-Rename !regex: AND %

if RegEx is disabled
if the filename contains a '%'

you get funny results ;-)

(the first few times, i was like, huh?)


Say you wanted to append XXX to the names below:
100% Everything
101% Everything

Oddly, the rename "change" gets recorded in Undo History.
void
Developer
Posts: 17152
Joined: Fri Oct 16, 2009 11:31 pm

Re: Everything, Multi-Rename !regex: AND %

Post by void »

Use %% to escape a single literal %

Everything should automatically match % as %% in the old and new format.
therube
Posts: 5056
Joined: Thu Sep 03, 2009 6:48 pm

Re: Everything, Multi-Rename !regex: AND %

Post by therube »

Everything should automatically match % as %% in the old and new format.
Yes, it does.


Oops, I guess my (shown) example wasn't good enough.

Say you wanted to append XXX to the names below:

Code: Select all

ABC    100% Everything
DEF    101% Everything
To:

Code: Select all

ABC    100% Everything XXX
DEF    101% Everything XXX
Result:

Code: Select all

ABC    100% Everything
DEF    101% Everything
Well, I'll be.
I'm thinking that sometimes it does not work?
(I'm going to have to pay closer attention...)
therube
Posts: 5056
Joined: Thu Sep 03, 2009 6:48 pm

Everything, ESCAPES

Post by therube »

Everything, Multi-Rename, RegEx unchecked

heh.
source name (must be 2 same named files, so must be in different directories):
Will_Be_%C9_Desert-1.jpg

Old Format:
Will_Be_%%C9_Dessert-1.jpg
New Format:
<nothing done in New effects any change>


In Old Format, % ESCAPES %, so %C9 becomes %%C9
In order for 2 same named files to work, you need to UN-ESCAPE the ESCAPE

Old Format:
Will_Be_%C9_Desert-1.jpg
New:
abc123 - Will_Be_%%C9_Desert-0%1.jpg
<works, even with the ESCAPEd ESCAPE>


---


source names:
Will_Be_%C9_Desert-1.jpg
Will_Be_%C9_Desert-2.jpg
Will_Be_%C9_Desert-3.jpg

Old:
Will_Be_%%C9_Desert-0%1.jpg
New:
abc123 - Will_Be_%%C9_Desert-0%1.jpg
<works, files will be named as expected>
therube
Posts: 5056
Joined: Thu Sep 03, 2009 6:48 pm

Everything, ESCAPES

Post by therube »

heh.
i was looking for a filename of "!fa1913"
so i typed in, !fa1913
heh.

so actually !!fa1913 <kind of> or "!fa1913" will work
heh.

but it actually needs to be "!fa1913"
because !!fa1913
finds both; "!fa1913" & "fa1913"
void
Developer
Posts: 17152
Joined: Fri Oct 16, 2009 11:31 pm

Re: Everything, Multi-Rename !regex: AND %

Post by void »

Thanks for the issue report therube,

The multi-file renamer is not treating %% as % when there's no %1-%9 variable.

I will have a fix in the next alpha update.


i was looking for a filename of "!fa1913"
This is the unfortunate case of Everything using a valid filename character as an operator.

Hopefully most filenames don't start with !

The best approach is to use double quotes to escape any operators.

The ! operator can be disabled with allow_exclamation_point_not
not: can be used instead.
therube
Posts: 5056
Joined: Thu Sep 03, 2009 6:48 pm

Re: Everything, Multi-Rename !regex: AND %

Post by therube »

this threw me for a loop
wanted to replace the 2b's
but i wanted to prefix the first with 118-

Code: Select all

in%2Bea%2Bfo%2Bse
in%2Bin%2Bab%2Bmi
in%2Bis%2Bal%2Bbr
in%2Bre%2B41%2Byo
in%2Bsa%2BDo%2BMe
in%2Bwa%2Byo%2BIN
so Old format: was something (like): in%%2B%1
(it %%'d the %2B)


OK, so i got my 118 in there (with regex:)

so now i'm something like: in-118-%2Bea%2Bfo%2Bse
& what i want to do is then:

Code: Select all

Old: %2B
New: -
so i'd end up like: in-118-ea-fo-se
but using said Old: New: isn't cutting it...


Oh.
regex: will do the whole thing.



why in the world wouldn't one want %'s in their filenames
& file names that start with ! ;-)
therube
Posts: 5056
Joined: Thu Sep 03, 2009 6:48 pm

Re: Everything, Multi-Rename !regex: AND %

Post by therube »

i had thought ??? one did global (non-regex) & one only did the 1st. match (regex:)
[when you do an Old: New: like above].

did that change (or am i not remembering correctly)?
void
Developer
Posts: 17152
Joined: Fri Oct 16, 2009 11:31 pm

Re: Everything, Multi-Rename !regex: AND %

Post by void »

Thank you for the issue report therube,

Matching %%2B will be fixed in the next alpha update.
%%2B was treating the old format as having a %2 variable.
I'll have an update soon.



regex will replace all occurrences.
If regex is disabled, using %1-%9 will replace the first occurrence only.
if regex is disabled and there's no %1-%9, all occurrences are replaced. (this change was made for Everything 1.5)

Use ^ and $ with regex to ensure only the first occurrence is replaced.
void
Developer
Posts: 17152
Joined: Fri Oct 16, 2009 11:31 pm

Re: Everything, Multi-Rename !regex: AND %

Post by void »

Everything 1.5.0.1344a will now replace %% in the new format with %.

%%2b will no longer flag the search as having a %0-%9 variable. (forcing the whole filename to match and only replacing one occurrence)
therube
Posts: 5056
Joined: Thu Sep 03, 2009 6:48 pm

Re: Everything, Multi-Rename !regex: AND %

Post by therube »

just noting...


old format was: cia&ani4%1
(%1 was the correct placeholder, correct representing %1)

new (wanted) format: cia%26ani4%1
(i wanted a physical '%26' in there)

in order to get it to work, you need to double the (percent in) %26

new format: cia%%26ani4%1
therube
Posts: 5056
Joined: Thu Sep 03, 2009 6:48 pm

Re: Everything, Multi-Rename !regex: AND %

Post by therube »

And on that---^ note:


actually, i guess you /do/ need to pay a little bit of attention
- i wasn't, & it got me ;-)

old was: sent%21_025
& i simply copied that (to clipboard)
(& then, not paying attention)
pasted it into new:
& ended up with: sent1_025
(where i actually wanted, literally, "sent%21_025")

(boggles my mind why anyone would use such a magic character,
much less a . in a directory name ;-))

so remember... next time, pay a little attention :-).
void
Developer
Posts: 17152
Joined: Fri Oct 16, 2009 11:31 pm

Re: Everything, Multi-Rename !regex: AND %

Post by void »

pasted it into new:
Should Everything convert % to %% when pasting?

This will cause havoc if you cut the the new format and re-paste it..

I guess you could add a flag to the clipboard when copying from the new format..

I'll think on this some more...
therube
Posts: 5056
Joined: Thu Sep 03, 2009 6:48 pm

Re: Everything, Multi-Rename !regex: AND %

Post by therube »

(so, what was really happening...)

now...


old: l%%26a1_22
- worked correctly (copy to clipboard)
(& so then also pasted correctly)

... i'm (now) thinking that
(the other, above) old: must have been that i had 2 files highlighted & copy
old: <dang, i dup'd the issue, then i looked some more, & have now lost it! [in more ways then one - i'll think about it]>

in any case, vigilance i say, heh


---

ah, OK

> rr%%26tt

if you F2 that (single/inline file rename)
& copy to clipboard
- it copies as:
rr%26tt - a single %

if you Shift+F2 that (multi-rename)
& copy to clipboard
- it copies as:
rr%%26tt - double %%


so, when you paste the (clipboard) elsewhere
you'll get either
rr%26tt
or
rr%%26tt
depending on how you went about the copy


so long as you're aware, one can deal with it.
therube
Posts: 5056
Joined: Thu Sep 03, 2009 6:48 pm

Re: Everything, Multi-Rename !regex: AND %

Post by therube »

i had the option of keeping a file named

!!!hehhehheh
or
hehhehheh

- guess which one i kept ;-)


---


(& on that note ;-))


look what i ran into, heh.

> %2FMacintosh%20%C9ems%2Fmail302

had to do quite a bit of % ESC'ing ;-)


> !!!!%7em%7e2
void
Developer
Posts: 17152
Joined: Fri Oct 16, 2009 11:31 pm

Re: Everything, Multi-Rename !regex: AND %

Post by void »

I will trial an option to use $1: instead of %1 to recall a variable.
therube
Posts: 5056
Joined: Thu Sep 03, 2009 6:48 pm

Re: Everything, Multi-Rename !regex: AND %

Post by therube »

%1 is fine, but you just have to be aware.
(And I'd think that $1 would confuse the matter.)


Seems most of my $$ deal with dollars, but at least one doesn't.
CC PNY Memory $10 Rebate.htm, Staples $150 Rebate Desktop or Laptop.htm, OD APC pcbun1 $10 Rebate.htm,
OD $150offCompaq 94714.jpg, AOC 24 $139.98.png, T-Mobile - 10 LINES FOR $150.pdf
C:\LIB\WIN7-DELL-HomePremium-ISO\sources\$OEM$\$1\Drivers\
therube
Posts: 5056
Joined: Thu Sep 03, 2009 6:48 pm

Re: Everything, Multi-Rename !regex: AND %

Post by therube »

(boggles my mind why anyone would use such a magic character,
much less a . in a directory name ;-))
And on that note (& as I'm not finding the other thread where "directory dot" came up in), have a gander at this, which is a bit interesting.

So here you have a (Windows) directory - with a dot.
Yet, from the looks of things, you wouldn't know, particularly.
(In particular because it has a .bin "extension", so Windows uses the .bin extension icon to display the directory, rather then a directory icon.)

E:\Users\RUBEN7\AppData\Local\Microsoft\Internet Explorer\UrlBlockManager\urlblocklist.bin
.
Everything - directories with dots - where the dot means something.png
Everything - directories with dots - where the dot means something.png (19.94 KiB) Viewed 25523 times
void
Developer
Posts: 17152
Joined: Fri Oct 16, 2009 11:31 pm

Re: Everything, Multi-Rename !regex: AND %

Post by void »

Regex might be the better option if you are using % in your filenames.

While it doesn't help your situation, Everything 1.5.0.1347a adds support for $1: - $9:
therube
Posts: 5056
Joined: Thu Sep 03, 2009 6:48 pm

Re: Everything, Multi-Rename !regex: AND %

Post by therube »

(
while we're here...


heh.
914%%20(1)
needs:
914%%%%20(1)

you've got to be ever aware! ;-)
(good thing i've got an odd assortment of "names" to play with)


---


> workin~3.jpg
> workin~4.jpg

cut in Everything
paste into a different directory

- a file already exists...
move & replace ?
don't move, leave this file in the destination folder: workin01-17.jpg
move, but keep both: working01-18 (2).jpg

- a file already exists...
move & replace ?
don't move, leave this file in the destination folder: workin08-18.jpg
move, but keep both: working08-18 (2).jpg


heh. it's not Everything, this time.
it's Windows. Windows is seeing an 8.3 & seeing the same 8.3 at the destination
though the two happen to be unrelated (in this case)
)
void
Developer
Posts: 17152
Joined: Fri Oct 16, 2009 11:31 pm

Re: Everything, Multi-Rename !regex: AND %

Post by void »

Everything 1.5.0.1348a will trial a new syntax for the advanced renamer.

Old format will now use * instead of %1 - %9
New format will now use $1: - $9: instead of %1 - %9

Regex syntax remains the same.



This change will bring the non-regex syntax (I like to call it the wildcard syntax) closer to the regex syntax.
The new $1: - $9: syntax matches the existing syntax for other properties. (for example: $count:, $size: $dm: )
This new syntax no longer conflicts with any filenames.
This new syntax no longer conflicts with some preprocessor functions (for example: [rand:%10] )



Advanced Rename
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: Everything, Multi-Rename !regex: AND %

Post by raccoon »

I feel indifferent about this change, but I'm also worried that simpler users may not as easily correlate the anonymous asterisks (*) with word positioning anchorage as the %1 %2 %3 did. This newer form requires an additional 10 IQ points to puzzle out without the explicit numbering. The old version feels nostalgically elegant and basic.
therube
Posts: 5056
Joined: Thu Sep 03, 2009 6:48 pm

Re: Everything, Multi-Rename !regex: AND %

Post by therube »

Oh, no, I don't like it at all.
Oh, oh, & it is not "just" $1..$9, it is $1:..$9:, oh, no can't say I'd like that at all.

More keystrokes, confusing.

The * is (to me) not indicative of anything.

I would much rather have %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%hi there, then * & $1: ;-).


(I even have a hard time writing, $1: - I do.)
And, I have a hard time seeing the *. %1 %2 %3, was very clear & easy. Now I have to actually look & try to understand.

Old: %1 %2 %3... made it very clear what was being referenced.
With *, that is lost, totally.
And you must actually count stars (for positional reference) rather them simply having "numbers" be the reference.

Oh, no, I do not like this at all.
therube
Posts: 5056
Joined: Thu Sep 03, 2009 6:48 pm

Re: Everything, Multi-Rename !regex: AND %

Post by therube »

Code: Select all

Old: Blue*kin ES-H1*.pdf
New: Blue$1:kin ES-H1$2:.pdf
That's an easy example, & to me, both old & new are nothing but gibberish.

Code: Select all

Old: Blue%1kin ES-H1%2.pdf
New: Blue%1kin ES-H1%2.pdf
You have different "syntax" for Old & New, with old being *, & new being $1: (man, that is hard to write!)
Character spacing "goes off", because in one instance a single character is used, & in the other, three.


Other softwares, & it seem to be rather common, use %1..%9 (& or \1..\9), but something like this, no I'd much rather ESC ESC's to no end, then deal with $1: (whew, it is hard to type).


Wait till I come across something a bit more complex, & that will surely blow my mind.
Where's the off switch :-).
therube
Posts: 5056
Joined: Thu Sep 03, 2009 6:48 pm

Re: Everything, Multi-Rename !regex: AND %

Post by therube »

I suppose this same syntax would then also apply to Advanced Copy/Move.
Yeah, it must.

I see no saving grace in this new syntax.
therube
Posts: 5056
Joined: Thu Sep 03, 2009 6:48 pm

Re: Everything, Multi-Rename !regex: AND %

Post by therube »

Everything Multi-Rename % vs $, some things are more important then $.png
Everything Multi-Rename % vs $, some things are more important then $.png (11.32 KiB) Viewed 24577 times
(As it says, some things are more important then $$'s.)
.
Everything - Multi-rename WinRAR.png
Everything - Multi-rename WinRAR.png (14.55 KiB) Viewed 24575 times
Granted, both are rather ugly, but % is still much better then $1:.
.
Everything - Multi-rename WinRAR2.png
Everything - Multi-rename WinRAR2.png (13.77 KiB) Viewed 24574 times
A bit more realistic & still not "good", but I'm far better able to make out what is going on with %.


Just the simple fact that "spacing", i.e. length of the name string format, is the same, Old vs. New [with %], makes a big difference.
void
Developer
Posts: 17152
Joined: Fri Oct 16, 2009 11:31 pm

Re: Everything, Multi-Rename !regex: AND %

Post by void »

Thank you for the feedback raccoon and therube,

Everything 1.5.0.1349a restores the %1 - %9 syntax style.

Sorry, I should have made the * syntax an option.
therube
Posts: 5056
Joined: Thu Sep 03, 2009 6:48 pm

Re: Everything, Multi-Rename !regex: AND %

Post by therube »

(Even though it's fixed, & even though I really haven't done much renaming with 1348 [which is odd]...)
Old: 42_06*
New: 42_06$1:x
Even something so simple as appending an 'x' to the name,
i know exactly what i want to do, i know exactly how it
works, but then i see, "42_06$1:" & i'm like, "what is that?"

Bulk Rename Utility has 3 "RegEx" methods; what they call "plain", "simple", & "v2".
"plain" is PERL 5 (PCRE)
"simple" is %1..%9, just like Everything < 1348 (& now >= 1349)
"v2" is a superset (if you will) of "plain" (additional features)


with 1348, even if the * were enclosed in parens, (*), that would help - some,
to make it more apparent what is being matched, where (but even then still not
as clear as the "simple" %1...)

& then entire $ dollar 1 one : colon construct, is simply, simply, simply,
not simple, & you have to look & look & look & say, huh, & huh & huh, &
think & ponder & check... "simple" has flown out the door.

to reverse fields & you tell any layman
%1 - %2
->
%2 - %1
& they'll understand that. they will have no clue in China what any of it
means, but they can understand, oh, all i need to do is find the common
parts & some separator (differentiator) & flip their order - cool, i can do that

but if you tell them, oh, i don't even know what?
* - *
->
$2: - $1:
(i literally have to stop & think what i'm writing, above)
they're like huh?
& then they're like so * == $1 & * == $2, so * == *,
& oh, that's new math, like they teach in schools these days
(& is any wonder they cancel/postpone graduation - because
they don't have enough people to merit a graduation)

(& i write this, not even knowing if in fact * - * is a "thing", but, i'll see...
so, yes, it is [as i stumble my way through this])
therube
Posts: 5056
Joined: Thu Sep 03, 2009 6:48 pm

Re: Everything, Multi-Rename !regex: AND %

Post by therube »

And then, there is always a time for payment, you know, $$'s.
.
Everything - Multi-rename, stumbling my way through it.png
Everything - Multi-rename, stumbling my way through it.png (7.74 KiB) Viewed 24436 times
Everything - Multi-rename, format constructs are simply ugly.png
Everything - Multi-rename, format constructs are simply ugly.png (14.14 KiB) Viewed 24436 times
And last but not least, after you've paid, you've lost your $$'s.
Everything - Multi-rename, $ signs are lost, not sure how to ESC them, oh must be %$.png
Everything - Multi-rename, $ signs are lost, not sure how to ESC them, oh must be %$.png (12.83 KiB) Viewed 24436 times

And thank you :-).
therube
Posts: 5056
Joined: Thu Sep 03, 2009 6:48 pm

Re: Everything, Multi-Rename !regex: AND %

Post by therube »

Oh, I see now (with the last example).


The '$' ('$1') are the "fixed" (or whatever you want to call it) parts, & because I didn't physically include them in the New Format:, they simply aren't.

So I should have done something like:
$2: -- $1 -- $1:, with $#: (with the colon) being the replacement part, & the $1 (without the colon) being the "fixed" part.


Oh.
Post Reply