You need a set of quotes around the variable as well, to properly
encapsulate the spaces. What happens if you change the section
³group=%a²
To
³group=²%a²²
?
On 4/8/08 12:32 PM, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
>
> I have a script that looks like this ...
>
> FOR /F %a IN (List-of-Daily-Full-Groups.txt) DO mminfo -avot -q "group=%a" -r
> "client,pool,volume,name,group,savetime(22),ssid,ssflags,clflags"
> 1>>Volumes.txt
> )
>
> Now, the file "List-of-Daily-Full-Groups.txt" looks like this ...
>
> ADMNLTS003
> Daily ADMNDEV002 SQL disk-only
>
> The loop works fine for the value ADMNLTS003, but dies on the 2nd entry.
> Apparently, it's stopping at the first space, so the loop is executing as:
>
> mminfo -avot -q "group=Daily" -r
> "client,pool,volume,name,group,savetime(22),ssid,ssflags,clflags"
> 1>>Volumes.txt
> 6095:mminfo: no matches found for the query
>
> So what I need to know is ... how can I restructure my FOR loop so that the
> value read from the file doesn't stop at the first space, but instead is the
> whole line? (or until the delimiter <CR>, I guess). I tried puting a special
> delimiter character at the end of each entry ("ADMNLTS003\"), but can't seem
> to figure out how to then strip the delimiter out of the variable ...
>
> Thanks
>
--
Salvador Manzo [ 620 W. 35th St - Los Angeles, CA 90089 e. [EMAIL PROTECTED] ]
Auxiliary Services IT, Datacenter
University of Southern California
818-612-5112
"The secret of happiness is freedom, and the secret of freedom is courage".
Pericles' Funeral Oration (431 BC)
~ Upgrade to Next Generation Antispam/Antivirus with Ninja! ~
~ <http://www.sunbelt-software.com/SunbeltMessagingNinja.cfm> ~