Sorry, you run
file convert foo.wav bah.ulaw
and it converts the file "foo.wav" to the file "bah.ulaw"?
What version of 'file' do you have on your CentOS box?
I would write a shell script for this - I would expect that to convert between each pair of formats, you will need to run a different command, so I would write a script to work out the format of the files (based on their extensions) and then run the appropriate command. Does that answer your question, or were you looking for something more specific?