autocart wrote:would like to have, please:
keep n characters from beginning
keep n characters from end
delete n characters from beginning
delete n characters from end
You could do that by utilizing Regular Expressions.
For example:
- Match first four signs: .{4}
- Match the rest of the name: .+
Now use parentheses (...) to capture what you have matched:
- Match first four signs: (.{4})
- Match the rest of the name: (.+)
Then replace with the wanted ()-matching group: $1 or $2, while dropping the other.
That way you can achieve what you are after.
----------------------------------
With XYPlorer RegEx Rename you would use this like this:
keep 4 characters from beginning (here introduced a third group to match the extension additionally )
(.{4})(.+)(\..+) > $1$3
keep 4 characters from end ( 4 to keep, plus dot plus 3 signs extension = 8 )
(.+)(.{8}) > $2
OR
(.+)(.{4})(\..+) > $2$3
delete 4 characters from beginning
(.{4})(.+) > $2
delete 4 characters from end
(.+)(.{4})(\..+) > $1$3
Note: this are simple regexes.
For files names with dots we have to make them more error save.
And if you learn how to use RegEx you can improve that expressions even more and more.
- - -
If you need more, you can always incorporate a third-party,
standalone portable, free renaming tool like SIREN:
Use Siren with XYplorer
http://scarabee-software.net/forum/viewtopic.php?id=228
Download:
http://scarabee-software.net/en/download.html
I am still using the old v2 due to its small file size ;-)
And for even more advantage tasks (better multi-steps handling, PascalScript), use den4b ReNamer. (
http://www.den4b.com/?x=products)
.