Wednesday, 21 August 2013

Renaming files based on the contents of a text file

Renaming files based on the contents of a text file

I have lots of point files I need to change for model input. I want to
rename lots of these files based on the contents of a file. These files
are text files arranged in rows.
file name: data_lat_long.txt
1 data_20_20
2 data_30_40
3 data_50_60
..
..
and so on
my files are named 1, 2, 3, 4, etc,.
I want 1 to be changed in to data_20_20, 2 in to data_30_40 and so on.

No comments:

Post a Comment