Jump to content

Does anyone know of any programs that provide in 98 batch


fortcollins

Recommended Posts

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.html

It 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


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

  • 2 weeks later...

I followed up on the links and eventually discovered that this functionality was included in the mdgx list at http://www.mdgx.com/dos.htm

I 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...