I am trying to get a BAT file to perform specific cleanup based on the volume label. I think I am getting close, but can't quite seem to get it 100%. Here is what I am trying so far:
echo This is where the prior boot cleanup will occur based on volume label
for /f "tokens=1-5*" %%1 in ('vol') do (set volume=%%6 & goto cleanup)
if /i %volume% EQU "TEST" goto TEST
echo This catches if the volume check has failed
echo This is where actions needed based on volume label would occur
echo That's All
I keep ending up in the FAILURE section despite the volume name being TEST and showing such if I echo it. Any help would be greatly appreciated.