[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Re: OT: NEVER MIND
- Subject: Re: OT: NEVER MIND
- From: Carl Distefano cld@xxxxxxxx
- Date: Tue, 21 Sep 2010 22:04:52 -0400
Reply to note from Harry Binswanger Tue, 21 Sep 2010
10:24:49 -0400
Harry:
> I'm sure there's a way, probably simple, to do this in
> CMD.EXE's .bat file
No doubt there's a pithier way to do it, but this should work:
@echo off
set V=
for /f "tokens=6 delims= " %%A in ('dir w: ^| find/i "volume in"') do set V=%%A
if not "%V%"=="Week-ATAPI6" goto :eof
:: Commands that execute only if volume label is "Week-ATAPI6":
XCOPY blah blah
[command]
[command]
set V=
goto :eof
You may need to tweak the FOR statement, depending on the exact output
of the DIR command on your system, but you get the idea.
Also, note that FOR...IN....DO is a single line (delete any internal
carriage return if one was inserted by your mail client).
--
Carl Distefano
cld@xxxxxxxx