Function $zf(-1) just executes a command passed as the second argument, you passed only file name. it is not complete, you should add command del for Windows.
set status = $zf(-1, "del c:\sys\text.txt")
it should return 0 if the command was successful.
If you want just delete a file, you can use %File class, useful for many different operations with files and folders.
set result = ##class(%File).Delete("c:\sys\text.txt")- Log in to post comments
