Rename File statement - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Changes the name of a file. You can issue this statement from the MapBasic window in MapInfo Pro.

Syntax

Rename File old_filespec As new_filespec

old_filespec is a string representing an existing file's name (and, optionally, path); the file must not be open.

new_filespec is a string representing the new name (and, optionally, path) for the file.

Description

The Rename File statement renames a file.

The new_filespec parameter specifies the file's new name. If new_filespec contains a directory path that differs from the file's original location, MapInfo Pro moves the file to the specified directory.

Example

Rename File "startup.wor" As "startup.bak"

See Also:

Rename File statement, Save File statement