home *** CD-ROM | disk | FTP | other *** search
- !!Script
- // Copyright ⌐ 1997-1998 - Modelworks Software
- // @Modified build 239 cm19981206
-
- /**
- @Tool: renameFile~displays a dialog to allow you to
- rename the active editor.
- @EndTool:
- @Summary: renameFile~rename the active editor
- */
-
- function DoCommand()
- {
- var editor = getActiveEditor();
- if (editor)
- {
- var file = editor.GetFile();
- if (file.exists) //cm19981206
- {
- var newFile = confirmFile("Rename the file", "", file, "*.*");
- if (newFile)
- {
- editor.rename(newFile.path);
- }
- }
- else
- {
- alert("Cannot rename an untitled file");
- }
- }
- }
-
- !!/Script
-
-