samintz
Scott Mintz
- May
- 1,590
- 27
The here-document redirection is not limited to external applications. I've used it to do a couple of nifty things that keep my scripts a little cleaner (I think).
Copy a group of files
Display a bunch of variables
Copy a group of files
Code:
(copy /y @con: .) << endtext
file1
file2
file3
file4
file5
endtext
Display a bunch of variables
Code:
(do var in @con (echo %var = %[%var])) << endtext
_4ver
_batch
_batchline
_batchname
_batchtype
_cmdline
_cmdproc
_cmdspec
_winuser
_winver
_wow64
_xpixels
_year
_ypixels
endtext