>
> I am trying the following to determine what tapes are available:
>
> for /f "delims=," %%i in (%INPUT_DIR%\Backup_pools.txt) do %NSR_BIN%
> \mminfo -q "!full,pool=%%i,location=Scalar_i2k" -r "pool,volume,written,%
> used,volflags"
>
Hmm. I have to change all the '%%i' bits into '%i' to make it work[1]
for me (on XP Pro). Is that some difference in our command shells?
[1] I don't have networker on windows, so "work" here means that the
shell doesn't error and I can pass the arguments properly.
> It is not liking the %used (which is a valid option).
What is the error message that you're getting? It looks like the
quoting is correct in your example (except for the %%i/%i difference..)
I use a perl program to simply print the arguments it gets to the
screen. That allows me to see if quoting is causing issues.
C:\temp>type cmd.pl
#!/usr/bin/perl
foreach my $arg (0 .. $#ARGV)
{ print "[$arg]: ->$ARGV[$arg]<-\n"; }
Then I can run your batch line with this in place of 'mminfo' to see
what is getting passed in....
C:\temp>for /f "delims=," %i in (pools.txt) do cmd.pl -q
"!full,pool=%i,location=Lib" -r "pool,volume,written,%used,volflags"
C:\temp>cmd.pl -q "!full,pool=Offsite,location=Lib" -r
"pool,volume,written,%used,volflags"
[0]: ->-q<-
[1]: ->!full,pool=Offsite,location=Lib<-
[2]: ->-r<-
[3]: ->pool,volume,written,%used,volflags<-
Which looks correct to me.
--
Darren Dunham ddunham AT taos DOT com
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
To sign off this list, send email to listserv AT listserv.temple DOT edu and
type "signoff networker" in the
body of the email. Please write to networker-request AT listserv.temple DOT edu
if you have any problems
wit this list. You can access the archives at
http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER
|