rename

rename — renames a file.

Syntax

rename (filename, new_name)

		

Arguments

filename
The name of a file on disk.
new_name
The new name for the file.

Returns

t if the file could be renamed, otherwise nil.

Description

This function makes an operating system call rename a file on disk. The exact behavior of this function depends on the renaming facility for the operating system.

Example

Gamma> rename("myfile.dat","x/myrenamedfile.dat");
t
Gamma> rename("x/myrenamedfile.dat","myfile.dat");
t
Gamma>