| Function group | Execute on client | Platform(s) |
| FileOps | NO | All |
FileOps.$deletefile(cPath[,bDeleteContents=kFalse,bRecursive=kFalse])
Deletes the file or folder named cPath. bDeleteContents deletes files inside cPath. bRecursive deletes sub-folders inside cPath if bDeleteContents is true.
Files deleted with $deletefile() are not moved into the Recycled bin or Trash can, they are deleted irreversibly. You can delete a folder with $deletefile(), but only if it is empty. The function returns an error code, or zero if successful: see the FileOps function error codes.
DoFileOps.$deletefile('c:\omnis\examples\extcomp\test1.txt')ReturnslError# deletes 'test1.txt' from 'c:\omnis\examples\extcomp'
DoFileOps.$changeworkingdir('c:\omnis')ReturnslError
DoFileOps.$deletefile('test2.txt')ReturnslError# deletes 'test2.txt' at the current folder 'c:\omnis'
DoFileOps.$deletefile('c:\omnis\examples\extcomp\clock')ReturnslError# deletes the 'clock' folder if empty