#1 : 06/03-16 13:24 John Stern
Posts: 2
|
Hello, i'm trying to rename files like this:
Original: 2015120304N.pdf Renamed: Someword1 - 2015-12-03 - Someword2.pdf I know how to add "Someword1 - " and " - Someword2", but i can't figure how to rename from "2015120304N" to "2015-12-03". Please note that i'm deleting the N letter and the last two digits, 04. Thanks in advance! |
#2 : 06/03-16 17:46 Tester123
Posts: 92
|
Reply to #1:
Try this Replace Method: Text to be replaced: (\d{4})(\d{2})(\d{2}).* Replace with: \1-\2-\3 Use regular expressions: Tick Summary: Define three groups (denoted by the parentheses): the first contains 4 digits, and the second and third group 2 digits. Following the three groups is any series of characters '.*' In the replace string take each of the three groups '\1', '\2' and '\3' and join them together placing a hyphen in between them. That has the effect of formatting the date as required while losing the trailing 'fluff'. |
#3 : 06/03-16 23:48 John Stern
Posts: 2
|
Reply to #2:
Thank you! That solve it!! |