Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to specify the Source Directory name in the XCOPY arguments. I'm trying following but it gives error.

setlocal enableextensions
set CopyPath=E:/DialerTFS/PredictiveDialer

XCOPY CopyPath%\AgentDetails\AgentDetails\Bin\Debug\*.dll C:\BuildProject\bash\%name%\AgentDetails /s /e /h /Y


If Have idea, please share.
Posted
Comments
Sergey Alexandrovich Kryukov 25-Aug-14 3:11am    
What idea?! On reading xcopy documentation? :-)
—SA
SachinSutar 25-Aug-14 3:15am    
getting Source Directory from variable. In Above code %CopyPath%
Sergey Alexandrovich Kryukov 25-Aug-14 3:19am    
I already answered, please see.
—SA

1 solution

Instead of " CopyPath%" should be "%CopyPath%", "name" is not defined, so what would you expect?
Please see:
http://en.wikipedia.org/wiki/XCOPY[^],
http://technet.microsoft.com/en-us/library/cc771254.aspx[^].

Better yet, see the xcopy documentation on your system:
xcopy /?


—SA
 
Share this answer
 
Comments
SachinSutar 25-Aug-14 3:32am    
Thanks. It solved.
Sergey Alexandrovich Kryukov 25-Aug-14 3:51am    
You are welcome.
Good luck, call again.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900