This is my first time creating a batch file. I am trying to execute by adding all the following inside a batch file. however the flow stops at the for loop. these command works when directly executed on command prompt. And I am also facing error with the copy command
SET ROOT="C:\Rahul\Projects\sub-folder"
SET WEB1=%ROOT%\folder1\1.war
SET WEB2=%ROOT%\folder2\2.war
SET SOURCE=%WEB1% %WEB2%
SET TARGET=C:\Rahul\softwares\apache-tomcat-6.0.29\webapps\
c:
cd C:\Rahul\softwares\apache-tomcat-6.0.29
rmdir /q /s work\Catalina
cd webapps
FOR %i in ("*.war") do rmdir /q /s %~ni
FOR %i in ("*.war") do del /q /s %i
FOR %i in (%SOURCE%) do copy %i %TARGET%