I cant figure out this variable scope.. heres the code. I've been reading around but cant seem to nail it. I want to copy a file 4 times and concatenate a name every time expanding the name of the file. it will copy: Cow, Cow Cow, Cow Cow Cow, etc.
set "hash = Cow"
call:filecreate "Cow","%hash%"
:filecreate
set "name = %~1"
for /l %%C in (1,1,4) do (
for /f %%a in ('xcopy "%filez%" "%desktop%" /H /Y /R /F') do (
ren "%desktop%\system.ini" "!name!"
)
set "name = !name! %~2"
)
goto:eof