Top Navigational Bar

Save - "ERROR: Can't Rename File" Causes And
DocumentID: 654205
Revision Date: 29-Feb-96 8:29:29 PM

The information in this document applies to:
WordPerfect® 5.1 for DOS

Problem

Symptoms: The error message "ERROR: Can't Rename File" (WP Error 23) or "Incompatible File Format" appear when a user saves and replaces a file with either the Save or the Save As option. Solutions: This WordPerfect error occurs when customers attempt to rename a file in List Files (F5), or when WP automatically renames a file (such as when a document is saved over an existing document, e.g., WP renames the existing document with a .BK! extension). This error might display for the following reasons:
1.      A file with the intended new name already exists.
2.      The file to be renamed is exclusively open.
3.      The user doesn't have sufficient network rights to rename files.
4.      The intended name is not a valid name.
5.      The operating environment can't handle certain characters in the filenames. There have been reported problems with the following characters: exclamation point (!), left bracket ({), right bracket (}), apostrophe ('), and forward slash (/).
6.      The name of the file exceeds the 64 character limit that DOS has on any given pathname, which includes backslashes.

Solution:
1.      Choose a new name.
2.      Ask whoever is using the file to close it.
3.      Get more networks rights (Modify, Erase).
4.      Choose a new filename.
5.      Check to see if the file can be renamed at DOS. If the file can be renamed at DOS (and the other solutions listed above do not work), try removing the operating environment to see if that may be the cause of the problem.
6.      Shorten the path and filename of the file.

This error will also occur if the attribute of the backup file (.BK!) is Hidden. The customer can avoid the error by making sure that the backup file is not flagged as Hidden.

How/Why:
DOS does not allow WP to delete files that have been flagged Read-Only or Hidden. The following steps illustrate why the error message occurs when a user tries to resave a file that has been flagged as Hidden:
1.      Create a document in WP and save it with the filename TEST.
2.      Exit WP and make the TEST file Hidden by typing ATTRIB +H TEST at a DOS prompt in the directory where TEST resides.
3.      Start WP, retrieve the TEST file, and make any editing changes.
4.      Save the TEST file with the same name (i.e., TEST) and answer Yes when asked if you want to replace the file.
      Note: At this point, WP renames TEST to TEST.BK! and the Hidden attribute is conserved. Since TEST was renamed, TEST no longer exists. WP next saves the edited version of TEST as a new file with no attributes.
5.      Exit WP and check the attributes of TEST and TEST.BK! by typing ATTRIB TEST.* at a DOS prompt in the directory where the files are located. Notice that TEST.BK! is Hidden, TEST is not.
6.      Start WP, retrieve the TEST file, and make any editing changes.
7.      Resave the edited TEST file and answer Yes when asked if you want to replace the file.
      Note: At this point WP tries to delete TEST.BK! so that it can rename TEST to TEST.BK! (see step 4 above), but since WP cannot delete Hidden files, the error "ERROR: Can't Rename File" appears.

Also, this error occurred when one user tried to save and replace the AUTOEXEC.BAT file because it was remaining open during the work session. If the user pressed Ctrl-Break while booting up to break out of the batch file, he has no problems editing and saving his AUTOEXEC.BAT file. This is not a WordPerfect problem. The customer can get around this problem by ending the batch file before editing or by saving the edited file as a different name then renaming the file.

Answer:

Details:


Product specifications, packaging, technical support and information (*Specifications*) refer to theUnited States retail English version only. Specifications for other versions may vary. All Specifications, claims, features, representations, and/or comparisons provided are correct to the best of our knowledge of the date of publication, but are subject to change without notice.OUR MAXIMUM AGGREGATE LIABILITY TO YOU AND THAT OF OUR DEALERS AND SUPPLIERS IS LIMITED. IT SHALL NOTEXCEED THE AMOUNT YOU PAID TO ACCESS THE INFORMATION. SEE LEGAL DISCLAIMER.