Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

spaces in a batch file

Status
Not open for further replies.

bitwise

Programmer
Mar 15, 2001
269
US
Quick question, how do I use a space in a batch file in a path to a file name?

I'm trying to install DOTNET framework from a batch file. The path to the installer has spaces in the directory names. I do not have control over this. The path is:

DIAGNOSTIC\WINDOWS UPDATES\NET Framework\v2.0\

There are 2 spaces in the above file name and running the install command from a batch file errors out because of the spaces. How can I "escape" these spaces in batch?

thanks

 
Try putting quote marks round it like this:-

"DIAGNOSTIC\WINDOWS UPDATES\NET Framework\v2.0\"

ROGER - G0AOZ.
 
You need to put quotes around the file name and path.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top