I am executing the XP_CMDSHELL as below:
Exec XP_CMDSHELL 'bcp "Select OrderID, OrderDate, OrderDesc from DB.dbo.Order" queryout C:\Orderfile.txt -k -t \t -c -Slocalhost -T'
One of two issues:
XP_CMDSHELL uses the SQL Server service account credentials for filesystem (and other) access. The service account won't have permissions on the root of C: and it doesn't matter if you can see it
SQL Server is on a server somewhere (that is, isn't a local install) and you are trying to access your local C: drive. SQL Server can't see this of course...