This is a very simple batch file I'm using to copy check if the company wallpaper is installed and if it isn't, install it. It works but not the way I want it to. I want it to check if the wallpaper already exists and not try to install it if it does. But for some reason it installs it regardless.
Can someone point out why?
Cheers.
:CHECK1
IF NOT EXIST C:\Windows\Web\Wallpaper\ffback.jpg GOTO :INSTALL_JPG ELSE GOTO :CHECK2
:CHECK2
IF NOT EXIST C:\Windows\Web\Wallpaper\ffback.bmp GOTO :INSTALL_BMP ELSE GOTO :END
:INSTALL_JPG
Copy "\\server\Desktop Settings\ffback.jpg" C:\Windows\Web\Wallpaper
:INSTALL_BMP
Copy "\\server\Desktop Settings\ffback.bmp" C:\Windows\Web\Wallpaper
:END
Can someone point out why?
Cheers.
:CHECK1
IF NOT EXIST C:\Windows\Web\Wallpaper\ffback.jpg GOTO :INSTALL_JPG ELSE GOTO :CHECK2
:CHECK2
IF NOT EXIST C:\Windows\Web\Wallpaper\ffback.bmp GOTO :INSTALL_BMP ELSE GOTO :END
:INSTALL_JPG
Copy "\\server\Desktop Settings\ffback.jpg" C:\Windows\Web\Wallpaper
:INSTALL_BMP
Copy "\\server\Desktop Settings\ffback.bmp" C:\Windows\Web\Wallpaper
:END