Right now what I want to do is pretty simple (search for a substring [which
I could do right now by piping the variable to file and using find] and
possibly character/substring replacement [which I gather can be done by the
set command from reading one of the earlier posts]).
Thanks,
Greg
Windows 2000 *is* NT (version 5).
Let's keep this straight please.
--
<!-Outsider//->
MS-DOS 6.22, Windows for Workgroups 3.11, Netscape Navigator 4.08
MS-DOS 7.1, Windows 4.1 (a.k.a. 98), Netscape Navigator 4.74
>D'oh wrote:
>>
>> It is my understanding that Windows 2000 (possibly NT?)...
>
>Windows 2000 *is* NT (version 5).
>Let's keep this straight please.
In your world it is.
You can keep posting off topic questions in alt.msdos.batch, but
please refrain from posting here unless you have something beneficial
to add.
Clay Calvert
CCal...@Wanguru.com
Replace "W" with "L"
SET %Var%=%Var:str1=str2% is the syntax for string replacement in NT
and Win2K.
Set WeekDay=Monday
Set WeekDay=%WeekDay:Mon=Satur%
Echo %WeekDay%
The following are examples of variable substitution and parsing in
Windows NT and Windows 2000.
A "#" character will indicate functionality only available in Windows
2000.
More information can be found from running "Set /?" and "For /?".
A "one-sided" variable is a single character variable that has a
single percent sign preceding the character.
Examples: %1 and %a
"Two-sided" variables can have more than one character and have a
percentage sign on both sides.
Examples: %temp% and %path%
%PATH:str1=str2% Substitution [: and =] Two sided only
%PATH:str1=%
%PATH:*str1=str2%
%Test:ab=xy% 123456789xycdef0
%Test:ab=% 123456789cdef0
%Test:*ab=% cdef0
%Test:*ab=XY% XYcdef0
[%:~X and %:~X,Y] Two sided variables only
The following string will be used for these examples:
set test=123456789abcdef0
Grab only the first 5 characters
%test:~0,5%
12345
Skip 7 characters and then grab the next 5
%test:~7,5%
89abc
Skip 7 characters and then grab everything else
%test:~7%
89abcdef0
Grab only the last 7 characters #
%test:~-7%
abcdef0
Grabs everything BUT the last 7 characters #
%test:~0,-7%
123456789
Grab between 7 from the front and 5 from the back #
%test:~7,-5%
89ab
Go back 7 from the end then grab 5 towards the end #
%test:~-7,5%
abcde
Grab between 7 from the end and 5 from the end #
%test:~-7,-5%
ab
[%~letter] One sided variables only
%~I removes any surrounding quotes (")
%~fI Fully qualified path name
%~dI Drive letter only
%~pI Path only
%~nI file Name only
%~xI eXtension only
%~sI Short names only
%~aI Attributes #
%~tI Time and date of file #
%~zI siZe of file #
[%~$string] Two-sided
%~$PATH:I searches the PATH and expands to the full name of the
first found
The modifiers can be combined to get compound results:
%~dpI - expands %I to a drive letter and path only
%~nxI - expands %I to a file name and extension only
%~fsI - expands %I to a full path name with short names only
%~dp$PATH:i - searches the PATH and expands to the drive letter and
path of the first found
%~ftzaI - expands %I to a DIR like output line #
In the above examples %I and PATH can be replaced by other valid
values. The %~ syntax is terminated by a valid FOR variable name.
Picking upper case variable names like %I makes it more readable and
avoids confusion with the modifiers, which are not case sensitive.
> please refrain from posting here unless you have something beneficial
> to add.
Please follow your own advice.
Great post, Clay; thanks for putting this together!
Phil Robyn
Univ. of California, Berkeley
To be more correct...
Windows 2000 Professional
Windows 2000 Server
Windows 2000 Advanced Server
Windows 2000 Datacenter Server
Which Windows 2000 Is Best for You?
Quick guide to the products:
http://www.microsoft.com/Windows2000/guide/choices.asp
HTH
--
__ _ _
|_ |_)(__ http://www.fpschultze.de
___| | ____)chultze_________________________________________________
I am logged in, therefore I am.
C:\> SET COMPUTERNAME
COMPUTERNAME=WIN2K01
C:\> SET OS
OS=Windows_NT
Thorsten
Greg
"Outsider" <nonvali...@yahoo.com> wrote in message
news:3ABDC712...@yahoo.com...
Thanks again.
Greg
"Clay Calvert" <ccal...@wanguru.com> wrote in message
news:jv2sbtolklvai3392...@4ax.com...
>Thank you very much!! I hadn't expected something quite so detailed
>although it's greatly appreciated and it "hit the spot"!
>
>Thanks again.
>
>Greg
Good, I'm glad it worked for you.
Why, that would be the one that runs on Linux, of course <g>.
>Frank-Peter Schultze wrote:
>>
>> "Outsider" <nonvali...@yahoo.com> schrieb im Newsbeitrag
>> news:3ABDC712...@yahoo.com...
>> > D'oh wrote:
>> > >
>> > > It is my understanding that Windows 2000 (possibly NT?)...
>> >
>> > Windows 2000 *is* NT (version 5).
>> > Let's keep this straight please.
>> >
>>
>> To be more correct...
>>
>> Windows 2000 Professional
>> Windows 2000 Server
>> Windows 2000 Advanced Server
>> Windows 2000 Datacenter Server
>>
>> Which Windows 2000 Is Best for You?
>
>
>Why, that would be the one that runs on Linux, of course <g>.
VmWare can do this. I run it in the inverse... Linux on Windows 2000.
How about putting VmWare on a CD and sending it to me :-)?
>Clay Calvert wrote:
>>
>> On Mon, 26 Mar 2001 06:57:15 +0100, Outsider
>> <nonvali...@yahoo.com> wrote:
>>
>> >Frank-Peter Schultze wrote:
>> >>
>
>> >> Which Windows 2000 Is Best for You?
>> >
>> >
>> >Why, that would be the one that runs on Linux, of course <g>.
>
>> VmWare can do this. I run it in the inverse... Linux on Windows 2000.
>>
>
>How about putting VmWare on a CD and sending it to me :-)?
You realize that the version that I bought requires NT or Win2K. I
did not buy the Linux version.
The minimum requirements are:
- 266MHz or faster processor
- RAM, Minimum: 96MB; recommended: 128MB
- At least 500MB free disk space recommended for guest operating
systems and applications.
If you still want it, let me know.
No, I hadn't realized that.
> The minimum requirements are:
>
> - 266MHz or faster processor
> - RAM, Minimum: 96MB; recommended: 128MB
> - At least 500MB free disk space recommended for guest operating
> systems and applications.
>
> If you still want it, let me know.
No. Thanks :-), but I don't think I can use that version.
http://www.vmware.com/support/reference/common/guest_dos.html
I could use a version that supports DOS 6.x, DOS 7.x/Win9.x and Linux.
MSD.exe says that the operating system is MS-DOS 5.5.
Can you name an operating system based on mechanisms used for backwards
compatiblity?
Hmm? VmWare does support all of those.
I can see why it would be a problem for you since you use emm386, but the
other OSes you listed run just fine.