I want to rename multiple files that follow the same naming convention, the only variation is the date at the end of the name.
For example TRADARCASHROLLUP.GRPTIRHK.01052017.CSV
I would like the new name of the file to begin with the date instead 01052017.TRADARCASHROLLUP.GRPTIRHK.CSV
Was hoping someone could help me write a batch script to achieve this. I have seen other answers but not been able to apply them to this.
I have tried using the following:
ls | %{ "C:UBSTestingIncomingTRADARCASHROLLUP.GRPTIRHK*" $_.name ($_.name
-replace '^(w+).(w+).(w+)', '$3.$1.$2')}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…