I run the following:
EXEC XP_CMDSHELL 'fsutil fsinfo volumeinfo C:'
returns
Error: The filename, directory name, or volume label syntax is incorrect.
NULL
NULL
However, hitting the D: drive works just fine. Also if I just run fsutil fsinfo volumeinfo C: from DOS prompt (e.g. regular command shell) – that works fine too.
What am I missing here?
I have no explanation as to why it doesn’t work, but the following does work for me:
Note the inclusion of the backslash at the end of the query.