I am getting some errors in my simple Batch file. The file is meant to copy the file "xyz.4do" to the same directory, then rename the copied file to "abc.4do" and finally move the copied/renamed file to a different folder.
My code is below and I have commented where the errors occur:
@ECHO off
CLS
SETLOCAL
SET file=C:/users/xyz/desktop/xyz.4do
SET newName=abc.4do
SET endDir=C:/users/abc/desktop
REM Error occurs on below line: "The system cannot find the file specified" but the file exists
COPY %file%
REM Error below: "The syntax of the command is incorrect"
REN %file% %newName%
REM Error occurs on below line: "The system cannot find the file specified"
MOVE %newName% %endDir%
ECHO.
PAUSE
ENDLOCAL