CMD/Batch show variable from .txt file -
trying import list of pre-set variables , show them on screen
@echo off cls /f %%i in (' type list.txt ') ( echo %%i )
but shows what's on list , doing like.. set var=%%i echo %var% won't job. how should go doing it?
list.txt:
systemroot allusersprofile appdata commonprogramfiles computername comspec
for /f %%i in (' type list.txt ') ( echo %%i call echo %%i=%%%%i%% )
when echo
called
, executed echo %thecontentsof%%i
%
so displays contents of required variable.
see endless articles delayed expansion
if want useful.
Comments
Post a Comment