Page 1 of 1
how to use the rename plugin
Posted: 26 Mar 2008, 19:55
by john
hello,
I would like to know how to use the rename plugin to rename for example [test#12]infofile[john].txt to infofile.txt
Re: how to use the rename plugin
Posted: 26 Mar 2008, 21:12
by ino
john wrote:hello,
I would like to know how to use the rename plugin to rename for example [test#12]infofile[john].txt to infofile.txt
Hi,
it is really powerful plug-in with many various ways how to rename one or more files at once.
In your case select file [test#12]infofile[john].txt and hit
Ctrl+Shift+R to run Rename plug-in.
Now how to rename it:
1) you can use
Manual mode - there you can rename it manually the same way as retyping plain text in notepad. When you are done hit the Rename button.
2) you can use
New name mode - write directly the new name of the file. Check drop down menu at the right side where you can use "wild-cards", so you can use
infofile.$(ExtPart) When you are done hit the Rename button.
3) you can use
Replace mode - in the Search for field type string you want to replace, ie
[test#12]infofile[john] and in the second line write infofile. Hit the Rename button. When you are done hit the Rename button.
4) you can use
Regular expressions - in the Search for field write regular expression you need - in this case
[\[[a-zA-Z#0-9]*\] uncheck option Only once in each name and check option Regular expression. This reg.exp. will remove any occurrences of left and right bracket and all letters, numbers and character # within that brackets. When you are done hit the Rename button.
At each step you can see instantly results in the
Preview frame in the New name culumn.
Hope it helps a bit
Edited and optimalized
Posted: 27 Mar 2008, 01:23
by john
i would like to know how to use the 4th method. I tried typing in the search field but can't do it correctly. What should i put in that field?
Posted: 27 Mar 2008, 01:29
by Ether
Put
in the search field, check the Regular expression checkbox and uncheck the Only once in each name checkbox.
Posted: 27 Mar 2008, 07:25
by ino
When checkbox Only once in each name is uchecked:
or you can use folowing regular expresion without unchecking Only once in each name checkbox:
Code: Select all
(\[[a-zA-Z0-9#]*\])([a-zA-Z0-9]*)(\[[a-zA-Z0-9#]*\])(.[a-z]*)
and replace it with:
for more information how Altap Salamander supports regular expression reffer to Help
or
http://www.altap.cz/salam_en/help/salam ... regexp.htm
or
http://www.regular-expressions.info/
and nice cheat sheet could be find here:
http://www.ilovejackdaniels.com/cheat-s ... eat-sheet/
Posted: 27 Mar 2008, 23:17
by john
Thanks for the instructions and links, i'll try to experiment with the use of expressions.