hello,
I would like to know how to use the rename plugin to rename for example [test#12]infofile[john].txt to infofile.txt
how to use the rename plugin
Re: how to use the rename plugin
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
Last edited by ino on 27 Mar 2008, 07:04, edited 1 time in total.
Put
in the search field, check the Regular expression checkbox and uncheck the Only once in each name checkbox.
Code: Select all
[\[+?][a-z#0-9]*\]
Ελληνικά rulez.
When checkbox Only once in each name is uchecked:
or you can use folowing regular expresion without unchecking Only once in each name checkbox:
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/
Code: Select all
[\[[a-zA-Z0-9#]*\]
Code: Select all
(\[[a-zA-Z0-9#]*\])([a-zA-Z0-9]*)(\[[a-zA-Z0-9#]*\])(.[a-z]*)
Code: Select all
$(2)$(4)
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/