How can I delete the first ten characters of file name of all files in a folder?
And how to delete particular characters in file name of all files in a folder?
how to delete first ten characters of file names in folder
Re: how to delete first ten characters of file names in fold
New RegExp Rename commandumapati wrote:How can I delete the first ten characters of file name of all files in a folder?
Code: Select all
(.{10})(.+) > $2Re: how to delete first ten characters of file names in fold
In the same way like in the post before...
E.g.:
There is a space after the ">" character!
This would delete all "y" and all "4" characters for all selected files.
E.g.:
Code: Select all
(y|4) > This would delete all "y" and all "4" characters for all selected files.
One of my scripts helped you out? Please donate via Paypal
Re: how to delete first ten characters of file names in fold
Since some chars might collide with RegExp's specials, I suggest you try Rename Special -> Search and Replace. (the (!) hint button has helpful syntax examples.)umapati wrote:And how to delete particular characters in file name of all files in a folder?
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: how to delete first ten characters of file names in fold
Many thanks to yusef88, highend, and SammaySarkar.
Re: how to delete first ten characters of file names in fold
Hi,
is there any simpler way than doing any length related renaming operations via regex? For instance, what about: delete two characters of the original filename, take the next 20 characters and add some words. It seems simple in other renamers...
Furthermore, is there some documentation about the RegEx syntax? Or the specification used? For instance, I'm used to "\1" for group back references instead of $1, and of course it didn't work.
Thanks
is there any simpler way than doing any length related renaming operations via regex? For instance, what about: delete two characters of the original filename, take the next 20 characters and add some words. It seems simple in other renamers...
Furthermore, is there some documentation about the RegEx syntax? Or the specification used? For instance, I'm used to "\1" for group back references instead of $1, and of course it didn't work.
Thanks
Re: how to delete first ten characters of file names in fold
No.is there any simpler way than doing any length related renaming operations via regex? For instance, what about: delete two characters of the original filename, take the next 20 characters and add some words.
XY uses vbscript.dll for regular expressions. To get the full specifications -> google.Furthermore, is there some documentation about the RegEx syntax? Or the specification used?
One of my scripts helped you out? Please donate via Paypal
Re: how to delete first ten characters of file names in fold
Besides highend's answer, Jeff, maybe this post might be of use: http://www.xyplorer.com/xyfc/viewtopic. ... 54#p130354. Save the code once, maybe directly under user-commands or in separate xys-files and then put them on a user button or call them through the user-commands menu or in whatever other way.Jeff wrote:is there any simpler way than doing any length related renaming operations via regex?
This would be a 2-step process then. 1st) Delete 2 chars. The files should normally stay selected. 2nd) Then add some words. I agree that XY should have the 1st one implemented by factory default. But doing these 2 steps consecutively makes no real difference compared to doing it in one operation, IMO. You think otherwise?Jeff wrote:For instance, what about: delete two characters of the original filename, take the next 20 characters and add some words.
I agree.Jeff wrote:It seems simple in other renamers...
This is another weakness of XY. So far I was using as reference: http://www.regular-expressions.info/vbscript.html and this forum. You can put the hyperlink also into the XY-catalog if you want to (1-click-fast-access).Jeff wrote:Furthermore, is there some documentation about the RegEx syntax? Or the specification used? For instance, I'm used to "\1" for group back references instead of $1, and of course it didn't work.
[AHK] redirecting Windows Explorer to XY, [XYS] Mini Tree with open tabs (cur loc expanded, tab folders highlighted), [AHK] customInlineRenameKeys, [AHK] clipboardHelper_and_XYEscToList
XYplorer Beta Club