In short I was provided this code by my professor, im getting an error where it says "%%X" the output says %%X unexpected error.
SETLOCAL ENABLEDELAYEDEXPANSION
SET CURRENT_DIR=%CD%
SET DIR_NAME=%CURRENT_DIR%\CIS153
SET COUNTER=1
MKDIR %DIR_NAME%
FOR /F "DELIMS=" %%X IN (MyData.txt) DO (
ECHO %%X > myFile!COUNTER!.txt
SET /A COUNTER=!COUNTER!+1
)
What I expect the the code to do is make a directory called CIS153 and based on the content from MyData.txt it'll create a new directory and write it to an entire new file.