Calling PowerShell from MATLAB: executing commands from within script
My goal is to call PowerShell from MATLAB and set a file path from within the script that I am writing. I have as of now:
!PowerShell "Set-Location C:Program Files (x86)"
The error that is displayed is as follows:
x86 : The term ‘x86’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:32
+ Set-Location C:Program Files (x86)
+ ~~~
+ CategoryInfo : ObjectNotFound: (x86:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Note: !PowerShell works for me, and I can cd to the file path I want to go to in the command window. However, I want to set the file path in the script.My goal is to call PowerShell from MATLAB and set a file path from within the script that I am writing. I have as of now:
!PowerShell "Set-Location C:Program Files (x86)"
The error that is displayed is as follows:
x86 : The term ‘x86’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:32
+ Set-Location C:Program Files (x86)
+ ~~~
+ CategoryInfo : ObjectNotFound: (x86:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Note: !PowerShell works for me, and I can cd to the file path I want to go to in the command window. However, I want to set the file path in the script. My goal is to call PowerShell from MATLAB and set a file path from within the script that I am writing. I have as of now:
!PowerShell "Set-Location C:Program Files (x86)"
The error that is displayed is as follows:
x86 : The term ‘x86’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:32
+ Set-Location C:Program Files (x86)
+ ~~~
+ CategoryInfo : ObjectNotFound: (x86:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Note: !PowerShell works for me, and I can cd to the file path I want to go to in the command window. However, I want to set the file path in the script. matlab, powershell MATLAB Answers — New Questions