"Simon Truong" wrote
> How could I retrieve the current directory name in a batch script?

The Mount/\Command "GetCD" displays the current directory and saves the
value in the variable %#cd%.

GetCD performs CONSISTENTLY under NT/2K/XP/K3. It is included in the FREE
Advanced NT/2K/XP/K3 Command Library (http://ntlib.com).

See the GetCD Page for details and color-keyed examples:


To obtain the current directory of all accessible local and mapped drive
letters, see ".ListCD" at

To obtain a list of all available (unused and unmapped) drive letters, see
".ListAvail" at


__________________________________________________ __________
TheSystemGuard.com | BoomingOrFuming.com | MountCommands.com
Free and "Almost Free" Knowledge for Windows System Admins!