#1 : 15/05-18 19:36 Charlie
Posts: 1
|
New to this and need some help
My options are File Pattern Renamer or Regular Expression Renamer. I need to rename IES3210_05142018.xlsx to IES310(date).txt I need help removing the _ I would expect the date would be written as ${date yyyy-MM-dd} Thanks again for the help |
#2 : 15/05-18 22:26 D.Ach
Posts: 35
|
Reply to #1:
#1, choose "List Replace" method "_" to "(" "xlsx" to "txt" (you can add other file extensions to the list if they vary, .doc to txt; .html to txt; etc.) set to "Name and Extension" _______________________________________ #2, also choose "Add" method ")" blank check "backwards" set to "Name" _______________________________________ No quotes on any of the above _______________________________________ "accept extension change warning" |
#3 : 15/05-18 22:36 Mark
Posts: 175
|
Reply to #2:
What about re-ordering the date to yyyy-MM-dd? |
#4 : 15/05-18 22:42 Mark
Posts: 175
|
Reply to #1:
Try this .... Replace Method Text to be replaced: (.*)([_])(\d\d)(\d\d)(\d\d\d\d)(.*) Replace with: \1(\5-\3-\4).txt Occurrence: All Case sensitive: Not ticked Use regular expressions: Ticked Apply. to: Name and extension Take Text to be replaced: (.*)([_])(\d\d)(\d\d)(\d\d\d\d)(.*) This is effectively creating 6 groups; the text up to the "_", the "_", the month, day, year, the rest including the extension. Note that the "( )" define the groups. Then \1(\5-\3-\4).txt Rebuilds the name and extension using your format IES310(date).txt which is taken to be IES310(YYYY-MM-DD.txt. Note that the "-" and "( )" here are purely text, the groups are the "\1" etc. |
#5 : 15/05-18 22:44 D.Ach
Posts: 35
|
Reply to #3:
Oops sorry, I see now. I'd have to see if I could work out the date format without RegExp (not good at RegExp). |
#6 : 15/05-18 23:14 Mark
Posts: 175
|
Reply to #5:
I think our posts have crossed! |
#7 : 16/05-18 14:12 D.Ach
Posts: 35
|
Reply to #6:
Hey Mark, What do you mean, crossed? I saw your post before I posted. I was referring to an 'alternate' solution without RegEx. |
#8 : 16/05-18 14:51 Mark
Posts: 175
|
Reply to #7:
Ah! Sorry, again :) Yes, it would interesting to see such a solution .... probably use the <Substr:> to swap the date order from MM-DD-YYYY to YYYY-MM-DD Assuming the format: IES3210_05142018.xlsx The "_" can be used .... <Subtr:"_":5:3> Or use <RSubstr See https://www.advancedrenamer.com/user_guide/compl ete_guide Hopefully, Charlie will get back to us ..... |
#9 : 17/05-18 09:51 Mark
Posts: 175
|
Reply to #8:
Or use the Move method! |