Yes, even in this day and age, there are still times when I need to write a "batch file". (It just sickens me...) To make it worse, MicroSlut, in its infinite wisdom, has yet to release a decent "shell". Rather than UPDATE DOS by adding new features, it continues to release NEW scripting languages. There has been VBScript,WHS, and now "PowerShell". Yet, even with all the bells, whistles, and object oriented razzmatazz, you still can't write a simple script to parse some strings and pass parameters to functions without spending a month learning a new language. Can't MicroSlut just implement a GNU version of Bash/Borne/CSH as part of its base distribution? Nope, then it wouldn't be a proprietary package that they could control into oblivion and obscurity.
So, I (we) are stuck having to do things the "old way".
This was a bit tricky. I had to search high and low to find the answer, but, finally found an example using the DOS FOR IN syntax.
Giving credit where credit is due... Wiki Batch Files:Current_Drive Letter
Using %CD% and DOS string modifiers we can do a lot of things. Open cmd.exe and type "echo %CD%". It will show like "C:\Documents and Settings\some user" Type:Since there is no test for empty/blank/null in DOS, you have to work around the "emptiness". The way to do this is to take the paramater, wrap it in parenthesis "()",and then test to see if the parameter equals the pair of parenthesis. Crude and simple, but it works. The text below is part of a file called "isempty.cmd". It expects that the first parameter is a string. If it the parameter/string is empty, it will tell you so.
Once you have saved it to a file, open a DOS/CMD window and excute with and without a something as the paramater