Export (0) Print
Expand All

RENAME Function (File)

Microsoft Dynamics Nav 2009

Use this function to rename an ASCII or binary file.


[Ok :=] File.RENAME(OldName, NewName)

Parameters

OldName

Type: text or code.

The current name of the file you want to change, including its path. When you enter the path, keep in mind these shortcuts:

  • You can omit the drive designation, if the file is located on the current drive.

  • You can omit the full path, if the file is located in the current directory.

  • You can enter only the subdirectory name, if the file is located in a subdirectory of the current directory.

NewName

Type: text or code

The new name you want to assign to the file, including its path. When you enter the path, keep in mind these shortcuts:

  • You can omit the drive designation, if the file is located on the current drive.

  • You can omit the full path, if the file is located in the current directory.

  • You can enter only the subdirectory name, if the file is located in a subdirectory of the current directory.

Type: Boolean

If you omit this optional return value, a run-time error occurs when the file cannot be found. When you include the return value, it is assumed you will handle any errors.

true if the file was renamed; otherwise, false.

Typically the return value is false if the file does not exist, or if the file is a system or hidden file.

Community Additions

ADD
Show:
© 2014 Microsoft