Jump to content

Does anyone know of any programs that provide in 98 batch


Recommended Posts

Posted

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?


Posted

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

  • 2 weeks later...

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