I’ve sometimes come across problems while working with remote sensing data and software, where the data that I’ve downloaded is not readable in the software because its file name contains an unwanted character, such as “-“. Today I had a time series of 612 GIMMS files that needed to go from data1_15_Apr_1982 to data19820401 (for example). The idea of doing it manually did not appeal to me at all, so I found a program that I’ve been looking for for a long time, the Bulk Rename Utility. You don’t need to be a programmer to use it and it’s free and quite easy to understand (and if you prefer coding I suggest you take a look here). In my case, I had to do it in several steps, maybe because I don’t know how to add more than one of the same type of criteria, but here’s how I did it:
Step 1: Move last 4 to position 5 (this part puts the year after “data”)
Step 2: Replace “_Apr_” with “04” (And iterate for each month – this part could maybe be improved)
Step 3: Replace the following:
“1-15” with “01”
“16-28” with “16”
“16-29” with “16” (leap year)
“16-30” with “16”
“16-31” with “16” (wish all months had the same no of days)
Step 4: Move last 2 to position 9
It quickly processed the 612 files and doing it in steps helped me make sure that I did it right.
What I need the data files for is a story for another post!