Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.msdos.batch    |    Fun with MS-DOS batch files    |    42,547 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 41,447 of 42,547    |
|    T to All    |
|    Re: How to I place the contents of a fil    |
|    01 May 16 20:10:00    |
      From: T@invalid.invalid              On 05/01/2016 04:09 PM, T wrote:       > Hi All,       >       > How to I place the contents of a file into a variable?       >       > I am looking for something like the following bash       > variable assignment but in "batch"       >       > #!/bin/bash       > Count=$(cat CountFile.txt)       >       > Many thanks,       > -T                     I found this in my notes. Is there a less complicated method?              echo sri_test.txt>> out.txt       For /f "tokens=* delims= " %%a in (out.txt) do set myvar=%%a       echo %myvar%              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca