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

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -