fortcollins Posted June 13, 2010 Share Posted June 13, 2010 The NT Windows systems include additional commands, using the tilde symbol, in the batch file language for setting environment variables to parts of a file path string, such as the name and the file extension.See http://searchwindowsserver.techtarget.com/tip/0,289483,sid68_gci1294869,00.html?int=off&Offer=WCMcplb18 under "variable substitution."See also http://www.rgagnon.com/gp/gp-0008.htmlIt would seem that to someone knowledgeable it would be easy to write a console mode program to provide identical functionality by taking these strings as arguments and parsing them and setting the corresponding environment variable from them.I looked in the shareware sites and came up with zip. I doubted that I had hit the right keywords. I am at a loss to know what to call this functionality.Does anyone know of any such programs? Link to comment Share on other sites More sharing options...
Queue Posted June 13, 2010 Share Posted June 13, 2010 I don't know of any utilities that mimic that functionality, but that's part of the ''command extensions'' in the WinNT command line processor (cmd.exe). One way to get said functionality is by using a version of cmd.exe that works on Win9x. They're referenced in the FOR command's help (FOR /?) as ''variable modifiers'' I think.You can test if command extensions are available in a batch file using something like:if "%~x9%~x9"=="~x9"Which would mean to do something if command extensions are NOT available.Queue Link to comment Share on other sites More sharing options...
jaclaz Posted June 13, 2010 Share Posted June 13, 2010 Have you tried the "alternate" "NT-like" command processor?http://www.boot-land.net/forums/index.php?&showtopic=2392jaclaz Link to comment Share on other sites More sharing options...
fortcollins Posted June 22, 2010 Author Share Posted June 22, 2010 I followed up on the links and eventually discovered that this functionality was included in the mdgx list at http://www.mdgx.com/dos.htmI had read that page before, but what these command extensions can do didn't come out of the deescription there.For some details on what they can do, see http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/for.mspx?mfr=true Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now