Rename a changing file name in UNIX?
Posted on 2002-06-26
I would really appreciate if someone could help me solve my problem. I am not a unix programmer but can move around. We can use Korn or Bourne Shell Scripts.
* File comes into a directory named \Incoming
* The file starts with P84C.125
* The file comes daily with the same filename but the extension increases. Therefore the new file is P84C.126
* I want to take the file P84C.125 and copy it to \Archive folder
* I want to rename the file to "process.dat" and move it to \process folder
note: the file name changes daily. My main problem is to rename the dynamic name of the file to "process.dat"
Thanks all for your help!