getting type to include %somevar%'s value

  • Thread starter Thread starter winter
  • Start date Start date
W

winter

Hi All,

Can you 'type' (or equiv) a document so that %somevar% is typed as its value?
Im piping the text into netcat, but need the variable value sent, not "%somevar%".

thx
winter
 
winter said:
Hi All,

Can you 'type' (or equiv) a document so that %somevar% is typed as its value?
Im piping the text into netcat, but need the variable value sent, not "%somevar%".

thx
winter
- - - - - - - - - - begin screen capture - - - - - - - - - -
<Win2000> c:\cmd>type %temp%\somevar.txt
Here is some text that contains some stuff.
This line contains %somevar%.
And here is another line containing %somevar%

<Win2000> c:\cmd>demo\somevar
Here is some text that contains some stuff.
This line contains some value.
And here is another line containing some value

<Win2000> c:\cmd>type demo\somevar.cmd
@echo off
setlocal
set somevar=some value
for /f "tokens=*" %%a in (
c:\temp\somevar.txt
) do call echo %%a
- - - - - - - - - - end screen capture - - - - - - - - - -
 
Back
Top