#1 01 May 2018 06:26

Frimool
New Member
Registered: 01 May 2018
Posts: 1

xcopy folder name with variables

I need to update several subdirectories of a server, I can not add a x in the name of a folder path.

Example :

xcopy "%~dp0fsaua-reset.exe" "\SRV-MDT\DeployShare\Applications\* - F-Secure Computer Protection 3.17.171.0\" /Q /I /E /Y

xcopy "%~dp0FsUninstallationTool.exe" "\SRV-MDT\DeployShare\Applications\* - F-Secure Computer Protection 3.17.171.0\" /Q /I /E /Y

"*" = variable of folder name

Dont work, please help me !

Offline

#2 08 May 2018 16:04

RG
Member
From: Minnesota
Registered: 18 Feb 2010
Posts: 342

Re: xcopy folder name with variables

Can you show the whole script... or at least the entire FOR loop?
Remember that variables are typically expanded at 'Load Time'. So if you are setting and interrogating a variable in a FOR loop or in a parenthesized block you will need to take that into consideration. Delayed Expansion is one way to do that.


CMD and InstallShield

Offline

Board footer

Powered by FluxBB