Page 1 of 1

Move feature missing "POSITION FROM RIGHT"

Posted: Mon Feb 03, 2014 4:32 pm
by JessKaufman
I love NameWiz and dont' know how I would live without it. It has been well thought out and includes so many possibilities, i can almost always use it to solve my renaming issues. Now and then i find myself wishing it supported something it does not.

For example, right now I have a large quantity of music directories with the names of albums and the year they were released. I have been able to strip out and format the names the way i want, but the four digit year (such as "1984) is at the END of the directory name. I would love to be able to MOVE the year to the beginning of the file name so the directories can be sorted in chronological order. However, the MOVE command does not have a "POSITION FROM RIGHT" check box, as the INSERT command does. If it did, i could MOVE four characters using position 1 (with POSITION FROM RIGHT box checked) and a character count of 4 to position 1. Each directory name is of different length, so i do not see any way to move the year from the end of each name to the beginning, other than doing it manually (not feasible for hundreds of names).

Am i missing something, or is NameWiz missing something??

Re: Move feature missing "POSITION FROM RIGHT"

Posted: Mon Feb 03, 2014 4:34 pm
by JessKaufman
By the way, do you plan any new updates for the software ... its been a long time.

Re: Move feature missing "POSITION FROM RIGHT"

Posted: Mon Feb 03, 2014 5:18 pm
by Support
Use the RegEx Rename plugin and in the "Mask", put in...

Code: Select all

(.*)(\d{4})$
and in the "Change to" make that...

Code: Select all

$2 $1
and this should move the year to the beginning of the file name.

We didn't have any reason to update NameWiz but now that you mention about no checkbox for the right position, we'll work on it.

Re: Move feature missing "POSITION FROM RIGHT"

Posted: Mon Feb 03, 2014 5:29 pm
by JessKaufman
Great, i'll try this out.

Love the fact that you will incorporate my suggestions. I had a few other "wishes" and when I remember what they were,will let you know.

Re: Move feature missing "POSITION FROM RIGHT"

Posted: Mon Feb 03, 2014 5:32 pm
by Support
Suggestions are always welcome. Thanks.

Re: Move feature missing "POSITION FROM RIGHT"

Posted: Mon Feb 03, 2014 5:51 pm
by JessKaufman
Worked like a charm. Wish i understood it, or the plug in was documented somewhere.

Re: Move feature missing "POSITION FROM RIGHT"

Posted: Mon Feb 03, 2014 6:01 pm
by Support
That's regular expressions as found in the Perl documentation. Basically it goes as follow...

.* mean everything, and if in between parenthesis, it means assign the match to $1
\d means a single digit from 0 to 9 and the {4} means four of those digits. The match will be assigned to $2 as it is enclosed in the second set of parenthesis.

$ mean the end of the line, in this case, then end of the file name.

As for the "Change to", we used the result from the match, that is, $2 and $1 which means the year was saved in $2 and the rest of the file name in $1. If you put in $1$2 the name would have stayed the same.

So (.*)(\d{4})$ means to match any characters up but not including a 4 digit number and save it in $1, following by that 4 digit number but that number must be at the end of the file name, then assign it to $2. If a file name does not match this regular expression, nothing is returned in $1 and $2

Re: Move feature missing "POSITION FROM RIGHT"

Posted: Fri Feb 07, 2014 12:51 pm
by JessKaufman
Great, thanks.

This works great on renaming directories, but does not seem to work for renaming files. What am i missing?

Re: Move feature missing "POSITION FROM RIGHT"

Posted: Fri Feb 07, 2014 12:59 pm
by Support
Can you give me an example of what you are trying to rename?

Re: Move feature missing "POSITION FROM RIGHT"

Posted: Fri Feb 07, 2014 1:12 pm
by JessKaufman
132010.avi
Blitz2011.avi
Cellular2004.avi
Chaos2005.avi
Collateral2004.avi
Crank 2 - High Voltage2009.avi
Crank2006.avi
Death Race2008.avi


Wanting to move the 4 digit year at the end to the beginning of the line. works great for directories. perhaps because of the extension?

Re: Move feature missing "POSITION FROM RIGHT"

Posted: Fri Feb 07, 2014 1:49 pm
by Support
ok, the "Mask" should be...

Code: Select all

(.*)(\d{4})(\..*)$
and the "Change to" should be

Code: Select all

$2$1$3
This RegEx take into consideration that there is a file extension.

Re: Move feature missing "POSITION FROM RIGHT"

Posted: Fri Feb 07, 2014 6:12 pm
by JessKaufman
worked perfectly. Thanks!

Re: Move feature missing "POSITION FROM RIGHT"

Posted: Sun Aug 14, 2016 4:55 am
by toddward
JessKaufman wrote:I love NameWiz and dont' know how I would live without it. It has been well thought out and includes so many possibilities, i can almost always use it to solve my renaming issues. Now and then i find myself wishing it supported something it does not.

For example, right now I have a large quantity of music directories with the names of albums and the year they were released. I have been able to strip out and format the names the way i want, but the four digit year (such as "1984) is at the END of the directory name. I would love to be able to MOVE the year to the beginning of the file name so the directories can be sorted in chronological order. However, the MOVE command does not have a "POSITION FROM RIGHT" check box, as the INSERT command does. If it did, i could MOVE four characters using position 1 (with POSITION FROM RIGHT box checked) and a character count of 4 to position 1. Each directory name is of different length, so i do not see any way to move the year from the end of each name to the beginning, other than doing it manually (not feasible for hundreds of names).

Am i missing something, or is NameWiz missing something??


I also love NameWiz. I was wondering if we have that extra checkbox now ? It is really very useful for well-organized people ;) I also search if I missed something but then saw your post and was relieved.