There’s a few commands that are only available in stand-alone Nyquist. These include SYSTEM, EXIT, PEEK, POKE, and probably a few others. I think they’ve been omitted because they would make it too easy for bad actors to create malicious plug-ins for Audacity. (The EXIT command was removed most recently, because it is inherently unsafe to quit Nyquist while it is running inside Audacity).
There’s been a couple of cases where I’d have liked to use SYSTEM, but I agreed with the other developers that it was too risky for inclusion in Audacity.
I don’t think it’s possible for Nyquist in Audacity to create (or delete) directories, or to delete files.
If you want to create a file, you can do that with OPEN.
Example, creating an empty text file:
(setf myfile "/fully/qualified/path/to/file")
(setf fp (open myfile :direction :output))
;; To print to the file, use (format fp "Text to print")
(close fp)