I have a batch file and it contains the following code:
@echo off
color 0e
:initialize
set filemaker=1
echo How many files?
echo.
set /p uservar=
echo Creating...
for /l %%x in (1, 1, %uservar%) do echo. 2>%CD%\%filemaker%.txt & set /a filemaker=%filemaker%+1 & timeout /t 1 /nobreak >nul
echo %filemaker%
pause
And everytime I execute it, the file that are generated (regardless of the value of %uservar%) is ALWAYS name 2, and there is always ony one file! I would like multiple with different names like, file 1 is name 1, file 2 is name 2, and so on.
Any help is appreciated!