DOS Fn 17H: Rename File via FCB
Compatibility: 1.0+
Expects: AH 17H
DS:DX address of a special-format FCB
──────────────────────────────────────────────────────────────────
Returns: AL 0 if the file was renamed successfully
0ffH file not found, new name already exists, other error
──────────────────────────────────────────────────────────────────
Info: Renames a file in the current default directory. Use the
following layout for renaming files with this function:
╔══► 0=default, 1=A, 2=B, etc.
offset len ┌─╨─┬───────────────────────────────┬───────────┐
+0 0cH │drv│ F I L E N A M E │ E X T │ ◄════ oldname
├───┴───┴───┴───┴───┴───┼───┴───┴───┴───┴───┴───┘
+0cH 6 │ reserved │
├───┴───┴───┴───┴───┴───┴───────┬────────────┐
+11H 0bH │ F I L E N A M E │ E X T │ ◄══════ newname
└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴────┘
Either name may contain ? wildcard▲ characters:
■ In the oldname a wildcard causes a search for all matches in
the default directory and renames each matching filespec.
■ In the newname it means: use the same character as found in
that position in the oldname.
Notes: ■ This function allows you to rename a directory by using an
Extended FCB with the proper file attribute for the oldname.
See Also: Fn 56H (rename/move file)
Directory and File Functions
DOS Functions
-♦-