I'm a statistician working with data being sent to me as Excel files. Each subject has 5 separate files. The first few files I got were named consistently.
1001_00.xlsx
1001_15.xlsx
1001_30.xlsx
1001_60.xlsx
1001_90.xlsx
Where the first 4 digits are subject identifiers, and 00, 15, ... 90 denote baseline and follow-up time points. I can write code to read these data and append into an analyzable format.
I was then sent additional data that has all kinds of inconsistencies. E.g.,
1002 M6.xlsx
1003_M6.xlsx
1004_BL.xlsx
1005 M1.xlsx
So what I need to be able to do is to selectively rename files. E.g. rename
1002 M6.xlsx to 1002_60.xlsx
1003_M6.xlsx to 1003_60.xlsx
In short I want a command too rename all files with certain time designations. Like
rename *_M6.xlsx to *_60.xlsx where * is a wildcard.
No matter what it's going to be a PITA but I was wondering if anyone knew of any software that would handle a task like this.
Thanks,
Brad
1001_00.xlsx
1001_15.xlsx
1001_30.xlsx
1001_60.xlsx
1001_90.xlsx
Where the first 4 digits are subject identifiers, and 00, 15, ... 90 denote baseline and follow-up time points. I can write code to read these data and append into an analyzable format.
I was then sent additional data that has all kinds of inconsistencies. E.g.,
1002 M6.xlsx
1003_M6.xlsx
1004_BL.xlsx
1005 M1.xlsx
So what I need to be able to do is to selectively rename files. E.g. rename
1002 M6.xlsx to 1002_60.xlsx
1003_M6.xlsx to 1003_60.xlsx
In short I want a command too rename all files with certain time designations. Like
rename *_M6.xlsx to *_60.xlsx where * is a wildcard.
No matter what it's going to be a PITA but I was wondering if anyone knew of any software that would handle a task like this.
Thanks,
Brad