FOR /f "tokens=1,2* delims=^" %%1 IN (%remfp%) DO ( ECHO %%2 pause echo entering process loop2 set /a ydiff=%%2:~6,10%% - %cury% echo %ydiff% set /a mdiff=%%2:~3,5%-%curm% echo %mdiff% set /a ddiff=%%2:~0,2%-%curd% echo %ddiff% )
remfp is a file path.
the variables (i.e. ydiff, mdiff, ddiff) just arent set and i can't figure out why. i mean, the value just doesn't go into the variable. im not sure if this makes sense, but can anyone help me?
FOR /f "tokens=1,2* delims=^" %%1 IN (%remfp%) DO ( ECHO %%2 pause echo entering process loop2 set /a ydiff=%%2:~6,10%%-%cury% echo %ydiff% set /a mdiff=%%2:~3,5%%-%curm% echo %mdiff% set /a ddiff=%%2:~0,2%%-%curd% echo %ddiff% )
%remfp% is a file with strings and dates %%2 is the date token %cury%,%curm%,%curd% are integer strings