Hello Wolfgang, from my experience, you actually need quotes when there are spaces in path names.
In the original copyfiles.bat there is set QMSI_VCREDIST_PATH="M:\deploy" copy %QMSI_VCREDIST_PATH%\vcredist_x64.exe This means there are quotes *once* - when setting the envionment variable. And with this it works for me also for the same kind of path as you are using. Now, you added qoutes also in the copy command. Then it does not work, also on my system. So the conclusion is that the quotes must be *either* in the set *or* in the copy command, not in both. From my understanding, the original copyfiles.bat is thus OK. Please try by removing the quotes from the copy command. Regards, Helmut Am 02.04.2016 um 19:44 schrieb WT: > Hello Helmut, > > I am not quite sure about the syntax rules for the set command in BAT-files. > I couldn't find an explicit and detailed description of the handling of > quotes in strings. > > Here are 2 examples under Windows7 showing the problem for 2 lines extracted > from copyfiles.bat: > > Example 1 (original version of copyfiles.bat with quotes): > > C:\>set QMSI_VCREDIST_PATH="c:\Program Files (x86)\Microsoft Visual Studio > 12.0\VC\redist\1033" > > C:\>copy "%QMSI_VCREDIST_PATH%\vcredist_x64.exe" > Das System kann die angegebene Datei nicht finden. > > I have spaces in the path name which I can't avoid. This leads immediately > to the error shown below the copy command line (the file under consideration > exists - see example 2!). > > The complete script is rather long and a user can easily fail to notice the > error message. > > Example 2 (no quotes): > > I drop the quotes (looks of course a bit strange) and run now > > C:\>set QMSI_VCREDIST_PATH=c:\Program Files (x86)\Microsoft Visual Studio > 12.0\VC\redist\1033 > > C:\>copy "%QMSI_VCREDIST_PATH%\vcredist_x64.exe" > Zugriff verweigert > 0 Datei(en) kopiert. > > Everything is now fine - the file under consideration is found. "Zugriff > verweigert" is ok. I do not have write permission to the given directory. > > > Thus, I think it would be better to remove the quotes in the path setting > commands of copyfiles.bat (and maybe in similar scripts). > > Have a nice weekend > > Wolfgang > > > > ------------------------------------------------------------------------------ > Transform Data into Opportunity. > Accelerate data analysis in your applications with > Intel Data Analytics Acceleration Library. > Click to learn more. > http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140 > _______________________________________________ > Qlandkartegt-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users > ------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140 _______________________________________________ Qlandkartegt-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users
