I am trying to run a simple Powershell script through Matlab. Its purpose is to exchange files between my laptop and HPC. From the command line everything works well, I can see files being copied and the whole process is finished in seconds.
powershell.exe -ExecutionPolicy Unrestricted -File C:\Users\...\TEST.ps1
But when I try to run in from Matlab, although I can still see the files being copied successfully, Matlab doesnt "stop", meaning it keeps busy forever and I need to shut it through Ctrl-C.
system('powershell.exe -ExecutionPolicy Unrestricted -File C:\Users\...\TEST.ps1')
As it is supposed to be a part of a bigger Matlab code, I would like it to work smoothly. Could anyone help me?
A.