This is how I run the command, via staf
, but it doesn't seem to list the files and folders under C:\Program Files
Even though the folder actually exists ..
[root@server ~]# winPath="C:\Program Files"
[root@server ~]# staf remoteServer.com PROCESS START SHELL COMMAND 'dir "$winPath"' WAIT RETURNSTDOUT STDERRTOSTDOUT
Response
--------
{
Return Code: 1
Key : <None>
Files : [
{
Return Code: 0
Data : Volume in drive C has no label.
Volume Serial Number is C052-46E0
Directory of C:\Windows\system32
File Not Found
}
]
}
Surrounding path with double quotes directly in command worked ..