Written by

Question sansa stark · Nov 4, 2016

MakeDirectory

Hi All, when I ran the Command to make a folder in particular directory its not working in terminal,but when i run the same command in studio output block it create the folder. Used command: S cmd="mkdir E:\DIRECTORY" O cmd:"QR":10 Suggest Please.

Comments

Clark Matthews · Nov 4, 2016

If you read from 'cmd' after the failure do you get an error back?

Example:

    USER>S cmd="mkdir F:\DIRECTORY"
    USER>O cmd:"QR":10
    USER>u cmd r X
    USER>zw
    X="The system cannot find the drive specified."
    cmd="mkdir F:\DIRECTORY"
    USER>

0
sansa stark  Nov 4, 2016 to Clark Matthews

I tried zf(-1) instead of thet but its not fine to work.

0
Eduard Lebedyuk · Nov 4, 2016

You can use %File class to create directories:

Write ##class(%File).CreateDeirectory(dir)
Write ##class(%File).CreateDeirectoryChain(dir)
0