I have created a simple batch script that only copies pdf file in the server. Copied file will be stored in a folder in desktop.
But after copying there is a "New Folder" created. Why is this happening?
this is my script :
:MENU1
set /p code=Input Folder Code:
if %code%==0 goto MENU1
goto CHECK1
:CHECK1
if exist "%sample2020%\%code%\STANDARD\DATA\PLAN\%code%WAB.pdf goto COPYFILE
if not exist else goto ERROR
:COPYFILE
xcopy "%sample2020%\%code%\STANDARD\DATA\PLAN\%code%WAB.pdf" "%HOMEPATH%\Desktop\2. FILES\%code%\DOCUMENTS\" /D /E /C /I /Y /H
start "" "%HOMEPATH%\Desktop\2. FILES\%code%\DOCUMENTS\"
goto MENU1
:ERROR
echo.
echo PK file cannot find....
PAUSE
start "" "%HOMEPATH%\Desktop\2. FILES\%code%\DOCUMENTS\"
this is the actual image of copied files ... as you can see it has a New Folder..