pestrue.TakeThisOut@gmail.com wrote:
> I have some old batch scripts I am trying to update to run on XP. My
> problem is with the FOR Command where I had a line
>
> for %%R in (*.doc) do set attachaas=!attachaas!,%%R
>
> apparently the '!' doesn't do what it used to. I just need to get a
> variable equal to
>
> attachaas = '1.doc,2.doc,3.doc' etc.
By default delayed variable expansion is off. You need to run cmd.exe with
the /V:ON switch to enable delayed variable expansion that will give the
behavior you want.
--
Tom Porterfield
>> Stay informed about: FOR Command in a batch file