cmd command not working on terminal

I try to run the cmd command in the studio terminal, but i am getting the <NOTOPEN> Error.

Even ZF(-1) also not working. Any help, Please!!!

 

Note: i restart the Cache instance service with full privilege

 

Code:

Set Path="mkdir E:\Sample\New"

Open Path:"QR":10

Error:<NOTOPEN>

 

This command working on my PC, but on server throws error.

 

Many Thanks

  • 0
  • 0
  • 358
  • 2
  • 1

Answers

I would recommend to use $zf instead of pipes, in this way you can get errorlevel. But in any way you can redirect error output to some file, to see what's going wrong. I suppose, that your E disk is a network disk, or you don't have e:\Sample path, where will be possible to create folder new

Thanks for the responds Dmitry, But i tried in C drive (Cache instance installed location) also. Facing same problem can't able to use $ZF and Pipes. I thought may be instance not having privilege to write on C drive, So tried cache instance location(C:/Intersystems/Ensemble/). But same issue.

Previously one of the server we faced the same problem but after restarted the Ensemble Service with full privilege using Log On. It started to  accept $ZF(-1) and Open cmd command.

I tried the same thing here, but this time i can't able to resolve it.

Thanks

And also, I forgot to mention about method CreateDirectoryChain in %File class. And you should use it, if you want just create a folder.

But back to $zf, can you try this command ?

set cmd="mkdir e:\Sample\new" > output.log 2> output.log"
set res=$zf(-1, cmd)

and what will be in res variable, and in output.log file which you can find in database folder for your namespace.