This is My Code
setlocal enabledelayedexpansion
for /F "delims=" %%x in (File.t0rrent) do (
set id = %%x
)
echo %id%
timeout /t 1000
the file "File.t0rrent"
was
**please dont edit this file**
*1405448673291003119829*
1234
it meant to be saying "1234"
but it says "ECHO is off."
Please Help
>Solution :
- there should be no spaces between assign statements
wrong:
set id = %%x
correct:
set id=%%x
- if you use "setlocal enabledelayedexpansion", then you should use !variable! instead of %variable%
correct code is below:
echo off
setlocal enabledelayedexpansion
for /F "delims=" %%x in (File.t0rrent) do (
set id=%%x
)
echo !id!
timeout /t 1000