This warning occurs because prior to evaluating the script, BATCH tries to change the worker's working directory to the same directory as the submitting MATLAB.
When the worker is on a different machine than the client, and the file system is not shared between the client and worker, this is not possible, and MATLAB gives the warning messages.
To work around this issue set 'CurrentDirectory' parameter in BATCH to '.', as follows:
job = batch('myScript','CaptureDiary',true, 'CurrentDirectory', '.');
waitForState(job)
diary(job)
destroy(job)
With 'CurrentDirectory' parameter set to '.' the BATCH command will not attempt to change the working directory on the worker.
Best Answer