11 Vote

File Renamer: Move first X characters to the end of the file name

Question by Mail Request | 2018-02-26 at 12:43

I like the application FileRenamer very much, simple and small.

However, I am missing a feature or I have not seen it.

If I change the file name by e.g. truncating 3 characters from the beginning, I would like to attach these removed characters to the behind but I don't want to use the placeholders %num% or %abs%.

023whatever.txt -> whatever023.txt

ReplyPositiveNegative
2Best Answer2 Votes

In your case, I would just work with the search and replace function with regular expressions:

Search for: (.{3})(.*)
Replace with: $2$1

And do not forget to check "Interpret as Regular Expression".

The regular expression in "Search for" looks for any 3 characters at the beginning, the regular expression in "Replace with" inserts the found characters from the first bracket with $1 and the ones from the second bracket with $2. With $2$1, we'll swap the order and you will get your desired result.

I hope I could help you.
Last update on 2020-10-25 | Created on 2018-02-27

ReplyPositive Negative
Reply

Related Topics

Rename File to its Folder Name

Tutorial | 0 Comments

PHP: File Download Script

Tutorial | 0 Comments

Important Note

Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.

Participate

Ask your own question or write your own article on askingbox.com. That’s how it’s done.