This is a rewrite of the initial code you posted;
Code:
@echo off
set "destDir=C:\Source"
call :checkExists "C:\Program Files (x86)\Microsoft Office\Office12\Library" "%destDir%"
call :checkExists "C:\Program Files (x86)\Microsoft Office\Office14\Library" "%destDir%"
call :checkExists "C:\Program Files (x86)\Microsoft Office\Office15\Library" "%destDir%"
EXIT /B
:checkExists
if exist "%1" (
xcopy %1 %2
)
goto:EOF
Adding this to an executable program with a GUI would be much more work that this simple program is worth in my opinion.
However if it's really important, you could simply make a java swing GUI, then wrap the executable with Launch4j.
Your post lacks many details and contents as how to proceed with a more in-depth approach.
Questions I would ask include:
1. What layout would the GUI be?
2. What would go on the GUI (what functionality/components/etc)?
3. Is this windows dependent? (could make into cross-platform)
4. Is this a simple script, or are you trying to use this on a large scale basis (lots and lots of files being used)
5. etc.
-lj