Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My machine does not have full SQL Server installed. The following distributable packages are installed on my machine:-

  1. Microsoft® SQL Server® 2008 R2 Command Line Utilities
  2. Microsoft® SQL Server® 2008 R2 Native Client

I have a batch file that runs the bcp utility. If i run this batch file from the folder where bcp.exe is sitting (\binn) it works.

My dump question is if there is any way I can run the bcp utility from c:\ drive only. Right now if it run from c:\ drive it says:-

bcp is not recognized as an internal or external command,..

share|improve this question
up vote 4 down vote accepted

You would need to add the folder containing bcp.exe to the environment variables search path.


share|improve this answer

You can read the bvp.exe path from registry and then simply use full path RootKey : HKEY_LOCAL_MACHINE PathKey : SOFTWARE\Microsoft\Microsoft SQL Server\100\Tools\ClientSetup Key : path (String)

share|improve this answer

Or just use the full path to the file:

C:\>"C:\Program Files\Microsoft SQL Server\100\Tools\Binn\bcp" rest_of_options_here
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.