I am trying to "deploy" word templates with this script:
if not exist "%USERPROFILE%\Documents\Custom Office Templates" (
mkdir "%USERPROFILE%\Documents\Custom Office Templates" 2>nul
if not errorlevel 1 (
xcopy /y /f /S "\\server\share" "%userprofile%\Documents\Custom Office Templates"
)
But i hit a snag, some installations of Office makes the folder "Custom Office Templates" on its own. But my script in its current state only copys files if the folder does not exist. So i got curious.
Question: Is it possible to make the script copy files if the folder exist? and if it doesn't exist my script proceeds with making the dir and copying files.
I know there are many other ways to deploy these things, and some would maybe be easier, but i want to try with this method. Hope you can help.
Thanks a bunch in advance.