Search found 6 matches

by ®ᴱᵴᴲᴙᴠᴱᴆ
23 Aug 2012 23:08
Forum: DOS Batch Forum
Topic: Str trim /w var expansion
Replies: 5
Views: 4848

Re: Str trim /w var expansion

Thank you.
Klik hier om verder te gaan [x]
Interesting choice of dialect...or something ;)
by ®ᴱᵴᴲᴙᴠᴱᴆ
23 Aug 2012 15:07
Forum: DOS Batch Forum
Topic: How to test for quotes inside conditions
Replies: 1
Views: 2442

How to test for quotes inside conditions

Are there different ways to test for things like quotes in the string...?!?

Code: Select all

@echo off
@setlocal enabledelayedexpansion

set var="
set ret="

if {!var!}=={!ret!} echo.How else can this be tested...w/o using setlocal...
by ®ᴱᵴᴲᴙᴠᴱᴆ
23 Aug 2012 15:00
Forum: DOS Batch Forum
Topic: Str trim /w var expansion
Replies: 5
Views: 4848

Re: Str trim /w var expansion

So, I would have to...

Code: Select all

set ret=%%x
echo.!ret:0,1!
)


Is there not a way I can....

Code: Select all

set ret=!%%x:~0,1%! ....or something.
)
echo.%ret%
by ®ᴱᵴᴲᴙᴠᴱᴆ
23 Aug 2012 14:57
Forum: DOS Batch Forum
Topic: color
Replies: 6
Views: 6628

Re: color

Thank you for the responses. When you change the console colors via properties the value still shows up as 0 in the registry. Unless the user has it specified in the registry as 0a, 0b, 0c ..... how do I obtain the hex value of console color not just 0 for default. Where is this data located?

Thanks
by ®ᴱᵴᴲᴙᴠᴱᴆ
23 Aug 2012 12:45
Forum: DOS Batch Forum
Topic: color
Replies: 6
Views: 6628

color

How can you get the default color value of the command prompt?
Do you have to read a registry key?
by ®ᴱᵴᴲᴙᴠᴱᴆ
23 Aug 2012 10:28
Forum: DOS Batch Forum
Topic: Str trim /w var expansion
Replies: 5
Views: 4848

Str trim /w var expansion

How do you... set mName=%ret:~0,1% ...using for /f "tokens=(val to get) delims=(/.- whatever)" %%- in ("%date%") do ( set ret=%%- ===> remove chars and expand to the val ) I call outside the loop and set ret=%ret:~0,1% How to trim, and set ret inside the loop...? using %%%%-:~0,1...