What is the function for deleting previously created files in the q command line?
?
For deleting a previously created file, I don’t think q has an keyword/operator for that. However you can use the system keyword to execute a system command (see more here - (system keyword executes a system command | Reference | kdb+ and q documentation - Kdb+ and q documentation (kx.com))
So for your example of deleting a file here’s a quick example. In the first line I’m writing some text to a file test.txt in a directory test and the following line I use a system command to delete it
q)`:test/test.txt 0: enlist "text to save" `:test/test.txt q)system"del test\\test.txt"
Just following up in on this, there is a keyword for this hdel - here is more info and usage examples for it:
hdel deletes a file or folder | reference | q and kdb+ documentation - Kdb+ and q documentation (kx.com)