lang • move

MOVE

MOVE OldName TO NewName

Renames or moves a file or a directory.

Oldname and NewName can be located on different directories, but must be located on the same device.

If you want to move a file whatever its location is, do the following:

Try Move OldName To NewName
If Error Then
  Try Copy OldName To NewName
  If Not Error Then Kill OldName
Endif

MOVE OldName DOWNTO NewName

Since 3.10

Renames or moves a file or a directory, erasing the destination file first, the two operations being atomic.

Oldname and NewName can be located on different directories, but must be located on the same device.

See also