Re: [Krename-users] Regex directory management
Brought to you by:
domseichter,
stonki
From: Dominik S. <dom...@we...> - 2011-02-06 16:32:35
|
I'm afraid. This won't work as the regular expression is only applied to the filename and not to the whole path. Am Sunday 06 February 2011 schrieb todd rme: > On Sat, Feb 5, 2011 at 6:26 AM, Dominik Seichter <dom...@we...> wrote: > > Hi, > > > > You are right. KRename was till today not able to handle this task. > > I commited two changes to SVN today, which will allow you to this. > > > > 1) Currently it was not possible to create a "/" as a directory separator > > from within regular expression. KRename always replaced it with %2f. So, > > I introduced the new token [dirsep] which will create a directory > > separator for you. > > > > 2) Tokens where not processed after doing find and replace. I added > > another checkbox which allows you to control this behaviour. > > > > Now, you can do the renaming like this: > > Find: Work ([\w]+) for > > Replace: \1/Work \1 for > > Regular Expression: Checked > > Process Tokens: Checked > > > > Just use $ as a template and the above as regular expression for find and > > replace and there you go. > > > > Cheers, > > Dominik > > Another question: will this also allow us to remove or change > directories in a path? Say we have files: > > documents/download1/article1.txt > documents/download2/article2.txt > documents/download3/article3.txt > documents/download4/article4.txt > > Could we strip out the "download\d/" and end up with: > > > documents/article1.txt > documents/article2.txt > documents/article3.txt > documents/article4.txt > > -Todd > > --------------------------------------------------------------------------- > --- The modern datacenter depends on network connectivity to access > resources and provide services. The best practices for maximizing a > physical server's connectivity to a physical network are well understood - > see how these rules translate into the virtual world? > http://p.sf.net/sfu/oracle-sfdevnlfb > _______________________________________________ > Krename-users mailing list > Kre...@li... > https://lists.sourceforge.net/lists/listinfo/krename-users -- Dominik Seichter - dom...@we... - http://domseichter.blogspot.com KRename - http://www.krename.net - Powerful batch renamer for KDE KBarcode - http://www.kbarcode.net - Barcode and label printing PoDoFo - http://podofo.sf.net - PDF generation and parsing library |