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
setlocal
set userdir=%localappdata%\Mic rosoft\Off ice
set remotedir=\\domain.com\net logon\Depl oyments\Cu stomOffice Ribbon
if not exist "%userdir%\Excel.officeUI" copy "%remotedir%\Excel.officeU I" "%userdir%\Excel.officeUI"
rem pause
endlocal
does this look right
@echo off
setlocal
set userdir=%localappdata%\Mic
set remotedir=\\domain.com\net
if not exist "%userdir%\Excel.officeUI"
rem pause
endlocal
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Open in new window
~bp