22.11.6.5 Change File Name
Modifies the file name. Parameter 1
designates the CF Card data folder. Parameter 2 designates the
original file name. Parameter 3 designates the new name.
_CF_rename/_USB_rename (Folder name, File
name, New file name)
The file name can also be specified indirectly using internal
addresses.

-
Parameter 1
Folder name: Fixed string (Maximum length is 32 single-byte
characters)
-
Parameter 2
File name: Fixed string (Maximum length is 32 single-byte
characters), Internal Device (Maximum length is 14 single-byte
characters), Internal Device designated with offset (Internal
Device + Temporary address, Maximum length is 14 single-byte
characters)
-
Parameter 3
File name: Fixed string (Maximum length is 12 single-byte
characters), Internal Device (Maximum length is 12 single-byte
characters), Internal Device designated with offset (Internal
Device + Temporary address, Maximum length is 12 single-byte
characters)
Example expression:
Defining the file name with a text string
_CF_rename
("\DATA","DATA0001.BIN","DATA1234.BIN")
In the above example, "\DATA\DATA0001.BIN" file is renamed
"\DATA\DATA1234.BIN".
Defining the file name with an internal device
_CF_rename ("\DATA", [w:[#INTERNAL]LS0100],
[w:[#INTERNAL]LS0200])
By storing the file name in LS0100 and LS0200, you can
indirectly specify file names.
Store the file name in LS0100 through LS0106 as follows.

When the above script is run, "\DATA\DATA0001.BIN" file is renamed
"\DATA\DATA1234.BIN".
-
Only the 8.3 format (a maximum of 12
characters, with 8 characters for the file name, the period, and 3
characters for the extension) can be used for the file name. You
cannot use file names longer than 12 characters.
-
Maximum length of parameter 1 folder name is
32 single-byte characters.
-
The folder name can be appended to the
parameter 2 file name. Maximum length of parameter 2 folder name +
file name is 32 single-byte characters.
For example, \DATA\01\DATA.bin
-
An Internal Device can be specified for the
second and third parameters (File names). Specifying Internal
Device allows indirect addressing of a file name. Also, when
specifying parameter 2 internal devices, the maximum folder name +
file name length is 14 single-byte characters.
-
You cannot append a folder name to the third
parameter's file name. If a folder name is appended, it will be
ignored.
-
When the LS Area is specified for "File
name", it is not counted as a D-Script Address.
-
To specify a root folder, specify " " (empty
string) as the folder name.
-
To specify a full path for a file name,
specify "*" (asterisk) as the folder name.
-
A folder name (directory name) cannot be
changed.
|