Summary
Deletes the specified file from the CF Card. Parameter 1 indicates the CF Card data folder. Parameter 2 indicates the name of the file to be deleted.
Format
_CF_delete/_USB_delete (Folder name, 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)
Example expression:
Defining the file name with a text string
_CF_delete ("\DATA", "DATA0001.BIN")
Defining the file name with an internal device
_CF_delete ("\DATA", [w:[#INTERNAL]LS0100])
In this example, a file name is stored in LS0100 through LS0106 as follows.
For example, when Text Data Mode = 1
The above expression deletes the file "\DATA\DATA0001.BIN".
The error status is stored for any error that occurs at the time of access to external storage or during file operation. Even when errors occur, the process continues. Therefore, when using the file operation function, always write a script that checks for errors.
22.11.7.7 Label Settings
You can only use the 8.3 format (a maximum of 12 characters, with 8 characters for the file name, the period, and 3 characters for the extension) for the file name. You cannot use file names longer than 12 characters.
To set a root folder, specify " " (empty string) as the folder name.
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 parameter (File name). Specifying Internal Device allows indirect addressing of a file name. Also, when using internal devices the maximum folder name + file name length is 14 single-byte characters.
When you specify an internal device for the file name, the file name storage order is defined by the Text Data Mode.
7.9.1 System Settings [Device/PLC] Settings Guide
When an internal device is specified for the File name, "Write-To Addresses" are not counted as D-Script Addresses.
To specify a full path for a file name, specify "*" (asterisk) as the folder name.