# Request help with Batch file to detect current dir



## Kilroy (Jan 15, 2004)

Greetings,
I am trying to write a batch file that will detect the current folder and will create a variable to test against. I can do it on any NT stayle OS but Haven't been able to find a way to accomplish this on Win 98.
Any help would be greatly appreciated.


----------



## codejockey (Feb 11, 2002)

I believe you can use the prompt command to do this job. You might have a look at the thread http://forums.techguy.org/showthread.php?s=&threadid=178382. The actual code appears in the thread http://forums.techguy.org/showthread.php?s=&threadid=175994. Although this example deals with the day of the week, you could easily modify it to use $p (the current directory) instead of $d and $t variables.

Hope this helps -- and if this is too confusing, post again and I'll try to create a real script you can use (no access to my DOS system at the moment ...).


----------

