On Monday 03 March 2008 16:53, Greg Freemyer wrote:
I have a directory with several hundred files in it. All in alphabetical order the way I need them.
I need to rename them to be in a totally different sequence.
ie. Currently nnn_mmm_lll.tif
Need to rename AAA_xxxx.tif where AAA is fixed, and xxxx is sequence I can specify the starting point for.
I'm about to write a shell script to do this, but would be nice to have a pre-existing tool I could call on. mmv is close I think, but I don't know how to do the sequence number with it.
Greg, I think krename can do most of this (if you don't mind a GUI). You can specify a prefix "AAA_", set a custom file name of "" and include a sequence of four (or more) digits starting where you like for the renamed file. I'm just not clear how the "xxxx" for each file is determined, if it is simply based on the numerical order of nnn_mmm_lll or something more sophisticted. krename can sort on numerical order for the input files, so that may serve your purpose. HTH. -- Don -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org