Page 2 of 2

Posted: 02 Apr 2008 19:56
by admin
graham wrote:%SETPATTREGEXP="(?m-s)Date\:\s*?((.*?[\d]{4})\s*?%-
([\d]{0,2}\:[\d]{0,2}\:[\d]{0,2})\s*?(.*))"%-
%REGEXPBLINDMATCH="%HEADERS" On %ODATE at %-
%SUBPATT="3"GMT %SUBPATT="4" %- (which was %OTIME where I live) -
you wrote and made these points on the subject of - %OSUBJ:
<mid:%SETPATTREGEXP="<(.*)>"%REGEXPMATCH="%OMSGID"%->
Whatever this means -- I agree with the rest of your post. And I'm also very interested in good scripts. Apart from the wiki, there is enough place for them now inside the "Tour".

@TheQuerty: have you updated your rename XYS files in the meantime? I'd like to host them for download

Posted: 02 Apr 2008 20:33
by TheQwerty
admin wrote:@TheQuerty: have you updated your rename XYS files in the meantime? I'd like to host them for download
That's TheQ-w-erty. :P

I just thought of this earlier when I read this post, but haven't gotten a chance to take a look and see if they still function correctly.

Hopefully tomorrow.

Posted: 02 Apr 2008 20:39
by admin
TheQwerty wrote:
admin wrote:@TheQuerty: have you updated your rename XYS files in the meantime? I'd like to host them for download
That's TheQ-w-erty. :P
At least it proves that I did not copy+paste your name. That's almost like getting a handwritten love letter! :wink:

Posted: 02 Apr 2008 22:50
by graham
admin wrote:
that's almost like getting a handwritten love letter!
and if it were sent as a reply email then my guru Regexp would translate to something of this sort assuming your letter came from South Africa to you in the UK.

On 01 April 2008 at 07:44:39GMT +0200 (which was 06:44 where I live) -
you wrote and made these points on the subject of - say no more [2]:
<mid:001301c893bb$7cb9d4e0$0100000a@abcdComputer>


I have decided, late in life, the world is full of experts so now I make use of them and accept my brain cells are not what they used to be!

Posted: 03 Apr 2008 00:48
by RalphM
TheQwerty wrote:
admin wrote:@TheQuerty: have you updated your rename XYS files in the meantime? I'd like to host them for download
That's TheQ-w-erty. :P

I just thought of this earlier when I read this post, but haven't gotten a chance to take a look and see if they still function correctly.

Hopefully tomorrow.
To save you some time testing - No they don't really work anymore with all the syntax changes we had in the past couple of weeks.
I copy and pasted them yesterday into the according files and changed the menu caption and label stuff, but didn't get as far to test the actual functions, I think I leave this to TheQwerty (btw your lucky it didn't come as TheQwertz with my German keyboard layout)

So here are my versions as of yesterday:

Code: Select all

//   .\Scripts\RegExp-Rename.xys 
//   This script makes it so that the other three menus sort of emulate submenus. 
"Filename Only... : Filename"
 load Scripts\RegExp-Filename.xys 
"Extension Only... : Ext"
 load Scripts\RegExp-Ext.xys 
"Both Filename and Extension... : Both"
 load Scripts\RegExp-Both.xys

Code: Select all

//   .\Scripts\RegExp-Filename.xys 
//   This script contains some complex regular expression patterns 
//   to perform operations on just the filename of selected items. 
Rename Filename Only 
- 
"1. Replace with 'text' : filename_1" 
     ::Input <?TEXT?>, Text to replace filename with. 
     ::Rename re, ^.+?(\.[^\.]*)?$><?TEXT?>$1, p 
- 
"2. Remove 'n' characters from left : filename_2" 
     ::Input <?N?>, Number of characters to remove from left of filename. 
     ::Rename re, ^(?:.{<?N?>,}?(.*\.[^\.]*))|(?:.{0,<?N?>}(\.[^\.]*))|(?:.{0,<?N?>}(.*))$>$1$2$3, p 
"3. Remove 'n' characters from right : filename_3" 
     ::Input <?N?>, Number of characters to remove from right of filename. 
     ::Rename re, ^(?:(.*).{<?N?>}(\.[^\.]*))|(?:.{0,<?N?>}(\.[^\.]*))|(?:(.*?).{0,<?N?>})$>$1$2$3$4, p 
"4. Remove 'n' characters starting after character 'x' : filename_4" 
     ::Input <?X?>, Position at which to start removing characters from filename.  (Leftmost = 0) 
     ::Input <?N?>, Number of characters to remove from filename starting at given position. 
     ::Rename re, ^(.{<?X?>})(?:(?:(?:(?:.{<?N?>}(.*?))|(?:.*?))(\.[^\.]*))|(?:(?:(?:.{<?N?>}(.*?))|(?:.*?))))$>$1$2$3$4, p 
- 
"5. Insert 'text' on left : filename_5" 
     ::Input <?TEXT?>, Text to insert before filename. 
     ::Rename re, ^><?TEXT?>, p 
"6. Insert 'text' on right : filename_6" 
     ::Input <?TEXT?>, Text to insert after filename. 
     ::Rename re, ^(.*?)(\.[^\.]*)?$>$1<?TEXT?>$2, p 
"7. Insert 'text' after character 'x' : filename_7" 
     ::Input <?X?>, Position at which to insert text into filename.  (Leftmost = 0) 
     ::Input <?TEXT?>, Text to insert into filename. 
     ::Rename re, ^(?:(?:(.{<?X?>})(.*?)(\.[^\.]*))|(?:(.*?)(\.[^\.]*))|(?:(.{<?X?>})(.*?))|(?:(.*)))$>$1$4$6$8<?TEXT?>$2$3$5$7, p

Code: Select all

//   .\Scripts\RegExp-Ext.xys 
//   This script contains some complex regular expression patterns 
//   to perform operations on just the extensions of selected items. 
Rename Extension Only 
- 
"1. Replace with 'text' : ext_1" 
     ::Input <?TEXT?>, Text to replace extension with. 
     ::Rename re, ^(.+?\.)(?:[^\.]*)$>$1<?TEXT?>, p 
- 
"2. Remove 'n' characters from left : ext_2"  
     ::Input <?N?>, Number of characters to remove from left of extension. 
     ::Rename re, ^(.+?\.)(?:(?:[^\.]{<?N?>}([^\.]*))|(?:[^\.]*))$>$1$2, p 
"3. Remove 'n' characters from right : ext_3" 
     ::Input <?N?>, Number of characters to remove from right of extension. 
     ::Rename re, ^(.+?\.)(?:(?:([^\.]*?)[^\.]{<?N?>})|(?:[^\.]*))$>$1$2, p 
"4. Remove 'n' characters starting after character 'x' : ext_4" 
     ::Input <?X?>, Position at which to start removing characters from extension.  (Leftmost = 0) 
     ::Input <?N?>, Number of characters to remove from extension starting at given position. 
     ::Rename re, ^(.+?\.)(?:(?:([^\.]{<?X?>})[^\.]{<?N?>}([^\.]*))|(?:([^\.]{<?X?>})[^\.]*)|(?:([^\.]*)))$>$1$2$3$4$5, p 
- 
"5. Insert 'text' on left : ext_5" 
     ::Input <?TEXT?>, Text to insert before extension. 
     ::Rename re, ^(.+?\.)([^\.]*)$>$1<?TEXT?>$2, p 
"6. Insert 'text' on right : ext_6" 
     ::Input <?TEXT?>, Text to insert after extension. 
     ::Rename re, ^(.+?\.)([^\.]*)$>$1$2<?TEXT?>, p 
"7. Insert 'text' after character 'x' : ext_7" 
     ::Input <?X?>, Position at which to insert text into extension.  (Leftmost = 0) 
     ::Input <?TEXT?>, Text to insert into extension. 
     ::Rename re, ^(.+?\.)(?:([^\.]{<?X?>})([^\.]*)|([^\.]*))$>$1$2$4<?TEXT?>$3, p

Code: Select all

//   .\Scripts\RegExp-Both.xys 
//   This script contains some complex regular expression patterns 
//   to perform operations on the filename and extension of selected items. 
Rename Both Filename and Extension 
- 
"1. Replace with 'text' : both_1" 
     ::Input <?TEXT?>, Text to replace filename (and extension) with. 
     ::Rename re, ^.*$><?TEXT?>, p 
"2. Replace 'query' with 'text' (Case Insensitive) : both_2" 
     ::Input <?QUERY?>, Query to replace. 
     ::Input <?TEXT?>, Text to replace Query with. 
     ::Rename re, <?QUERY?>><?TEXT?>, p 
"3. Replace 'query' with 'text' (Case Sensitive) : both_3" 
     ::Input <?QUERY?>, Query to replace. 
     ::Input <?TEXT?>, Text to replace Query with. 
     ::Rename re, <?QUERY?>><?TEXT?>\, p 
- 
"4. Remove 'n' characters from left : both_4" 
     ::Input <?N?>, Number of characters to remove from left of filename (and extension). 
     ::Rename re, ^(?:.{<?N?>}(.*))|.*$>$1, p 
"5. Remove 'n' characters from right : both_5" 
     ::Input <?N?>, Number of characters to remove from right of filename (and extension). 
     ::Rename re, ^(?:(.*).{<?N?>})|.*$>$1, p 
"6. Remove 'n' character at position 'x' : both_6" 
     ::Input <?X?>, Position at which to start removing characters from filename (and extension).  (Leftmost = 0) 
     ::Input <?N?>, Number of characters to remove from filename (and extension) starting at given position. 
     ::Rename re, ^(.{<?X?>})(?:(?:.{<?N?>}(.*))|.*)$>$1$2, p 
- 
"7. Insert 'text' before filename : both_7" 
     ::Input <?TEXT?>, Text to insert before filename (and extension). 
     ::Rename re, ^><?TEXT?>, p 
"8. Insert 'text' after filename : both_8" 
     ::Input <?TEXT?>, Text to insert after filename (and extension). 
     ::Rename re, $><?TEXT?>, p 
"9. Insert 'text' after character 'x' : both_9" 
     ::Input <?X?>, Position at which to insert text into filename (and extension).  (Leftmost = 0) 
     ::Input <?TEXT?>, Text to insert into filename (and extension). 
     ::Rename re, ^(?:(?:(.{<?X?>})(.*))|(.*))$>$1$3<?TEXT?>$2, p
@admin Yes the link to the download area for these files was broken yesterday, that's why I had to copy'n'paste 'em

Posted: 03 Apr 2008 13:27
by TheQwerty
RalphM wrote:To save you some time testing - No they don't really work anymore with all the syntax changes we had in the past couple of weeks.
I copy and pasted them yesterday into the according files and changed the menu caption and label stuff, but didn't get as far to test the actual functions, I think I leave this to TheQwerty (btw your lucky it didn't come as TheQwertz with my German keyboard layout)
:lol:

Thanks, I actually kept a local copy more up to date than the one posted in the forum.

I've reposted them here: http://www.xyplorer.com/xyfc/viewtopic. ... 0825#20825