KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums kdb+ Q for Mortals section 1.21 Re: Q for Mortals section 1.21

  • eteague

    Member
    March 18, 2022 at 12:00 am

    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"