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.
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 TheQwert
z 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