- Use server console to close the file.
- Switch to the server operating system.
- Click on the file and change it's name
- Return to the console and re-open the renamed file.
Be careful. If you have other database files that link to this one, their external data source references (found in Manage | External Data sources), will need to be updated to refer to the file by the new name.
Is there an easy way to script those steps?
No, these steps include manual steps taken to control the server console which cannot be scripted. Once youve closed the file, various scripting tools such as VBScript, batch files (windows) or Apple Script, could, in theory automate the file name change if the script can somehow determine what new name to give the file. Since this name change is simply a matter of clicking on the file and changing name, I don't think that would save any time for you, unless this were part of a larger operation.
Changing file names like this isn't something you normally need to do on a frequent basis. Why would you want to script it? (Perhaps there's an alternative approach.)