Well, you are setting up the variable correctly. Maybe you are just calling it incorrectly. Here is a sample file that sets up a COBDIR variable that points to a directory, then it displays what the variable equals; last, it does soemthing with the variable:
@echo off
set cobdir=c:\mp3
echo The COBDIR variable is %cobdir%
dir %cobdir%
And here is the screen output when you run this:
The COBDIR variable is c:\mp3
Volume in drive C has no label.
Volume Serial Number is 6877-859B
Directory of c:\mp3
05/06/2002 12:10a
.
05/06/2002 12:10a
..
04/29/2002 03:21p
Assorted
04/29/2002 03:23p
Delerium
04/29/2002 03:23p
Haujobb
03/08/2002 08:50p
Project Pitchfork
04/29/2002 03:22p
KMFDM
04/29/2002 03:22p
Lacuna Coil
05/06/2002 12:18a
Moby
04/18/2002 01:27a
Theatre of Tragedy
04/29/2002 03:21p
Type O Negative
05/08/2002 07:30a
Within Temptation
0 File(s) 0 bytes
12 Dir(s) 2,507,538,432 bytes free
So, rememerber to call the variable using the %VARIABLENAME% syntax, but use only VARIABLENAME when you set up the variable.
hope this helps