1

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?

AngryHacker
  • 59,598
  • 102
  • 325
  • 594

1 Answers1

1

I have no explanation as to why it doesn't work, but the following does work for me:

 EXEC master.dbo.xp_cmdshell 'fsutil fsinfo volumeinfo C:\' 

Note the inclusion of the backslash at the end of the query.

LittleBobbyTables - Au Revoir
  • 32,008
  • 25
  • 109
  • 114