Page 1 of 1
how to delete first ten characters of file names in folder
Posted: 17 Dec 2014 13:40
by umapati
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?
Re: how to delete first ten characters of file names in fold
Posted: 17 Dec 2014 14:03
by yusef88
umapati wrote:How can I delete the first ten characters of file name of all files in a folder?
New RegExp Rename command
Re: how to delete first ten characters of file names in fold
Posted: 17 Dec 2014 15:32
by highend
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.
Re: how to delete first ten characters of file names in fold
Posted: 17 Dec 2014 16:03
by bdeshi
umapati wrote:And how to delete particular characters in file name of all files in a folder?
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.)
Re: how to delete first ten characters of file names in fold
Posted: 20 Dec 2014 20:20
by umapati
Many thanks to yusef88, highend, and SammaySarkar.
Re: how to delete first ten characters of file names in fold
Posted: 17 Oct 2015 12:40
by Jeff
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
Re: how to delete first ten characters of file names in fold
Posted: 18 Oct 2015 08:45
by highend
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.
No.
Furthermore, is there some documentation about the RegEx syntax? Or the specification used?
XY uses vbscript.dll for regular expressions. To get the full specifications -> google.
Re: how to delete first ten characters of file names in fold
Posted: 19 Oct 2015 08:38
by autocart
Jeff wrote:is there any simpler way than doing any length related renaming operations via regex?
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:For instance, what about: delete two characters of the original filename, take the next 20 characters and add some words.
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:It seems simple in other renamers...
I agree.
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.
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).