Question

I'm trying to use a batch file to help setup a build project. As part of that process I need to copy a lot of files from a temporary directory: %temp%\wcu to a new directory in the %programfiles% directory.

I am using the following command:

xcopy %temp%\wcu\dotnetframework\*.* %programfiles%\"Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\DotNetFx35SP1" /S

Of course the problem is that %programfiles% equates to "C:\Program Files" with a space and so xcopy throws a wobbly.

Any ideas on how to get around this?

Was it helpful?

Solution

use quotes

xcopy "%temp%\wcu\dotnetframework\*.*" "%programfiles%\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\DotNetFx35SP1" /S
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top