How to rename multiple files in a directory? Suppose I have 20 .txt files in a directory.Now I want to rename these files to .doc I tried mv *.txt *.doc but I got message that while moving multiple files last argument must be a directory. Please tell me how to do it.