Deletes a file. Format #include <stdio.h> int remove (const char *file_spec);
1 – Argument
file_spec A pointer to the string that is an OpenVMS or a UNIX style file specification. The file specification can include a wildcard in its version number. So, for example, files of the form filename.txt;* can be deleted.
2 – Description
If you specify a directory in the filename and it is a search list that contains an error, VSI C for OpenVMS Systems interprets it as a file error. NOTE The DECC$ALLOW_REMOVE_OPEN_FILES feature logical controls the behavior of the remove function on open files. Ordinarily, the operation fails. However, POSIX conformance dictates that the operation succeed. With DECC$ALLOW_REMOVE_OPEN_FILES enabled, this POSIX conformant behavior is achieved. When remove is used to delete a symbolic link, the link itself is deleted, not the file to which it refers. The remove and delete functions are functionally equivalent in the C RTL. See also delete.
3 – Return Values
0 Indicates success. nonzero value Indicates failure.