Product Site

8.17. SysFileDelete

Deletes a file.

Parameter:
file

The name of the file to be deleted. The name does not support wildcard characters. On Unix-like systems, if the first character is a ~ (tilde) character optionally followed by a username, it is replaced by the current or specified user's home directory.

Return codes:
0

File deleted successfully.
Other

An operating system error code. On Windows, this may be one of the following, but could be others.
2

File not found.
3

Path not found.
5

Access denied or busy.
26

Not DOS disk.
32

Sharing violation.
36

Sharing buffer exceeded.
87

Does not exist.
206

File name exceeds range error.
Example 8.8. RexxUtil — SysFileDelete
parse arg InputFile OutputFile
call SysFileDelete OutputFile  -- unconditionally erase output file