Avatar of IT Guy
IT Guy

asked on 

if exist do not copy on bat script

see bat script below - i want to make sure that when the script runs if the file exists it just go to end and if the file does not exist then execute
does this look right

@echo off  
set userdir=%localappdata%\Microsoft\Office
set remotedir=\\domain.com\netlogon\Deployments\CustomOfficeRibbon
if not exist "%userdir%\Excel.officeUI" copy "%remotedir%\Excel.officeUI" "%userdir%\Excel.officeUI"
rem pause
VB ScriptScripting LanguagesShell ScriptingWindows BatchWindows OS

Avatar of undefined
Last Comment
Bill Prew

8/22/2022 - Mon