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

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

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

laravel - Undefined property: Illuminate\Pagination\LengthAwarePaginator::$id (View: F:\project\resources\views\admin\carousels\index.blade.php) -