whats he going on about ?

June 20, 2011 at 10:47:15
Specs: Windows XP
hi everyone,
belows my script
FOR /F "tokens=2 delims==}" %%A IN (xy.txt) DO @echo %%A

here's the xy.txt text
probs is only one instance of write happens n thats wrong = 32,Y this is equal to == in delims
can someone resolve the mystery
ivo posted
What do you want to get as result of parsing?

Setting "tokens=2 delims==}" catches just 32,Y since


1- {X
2- 32,Y
3- 62

and so on since your delimiters are = and } and they are not reported in the selected tokens.

whats he going on about ?
{x would be back 2 front
32,Y would be ==
62 would b right

See More: whats he going on about ?

Report •

June 21, 2011 at 01:24:43
You specify Tokens=2 which means you only want to process the second token in the input file which is 32,Y

Based on delims of = and } in {X=32,Y=62}{X=32,Y=63}{X=33,Y=61}
First token is {X (which is not processed)
Second token is 32,Y
Third token would be 62 (which is not processed)

What are you trying to achieve with your script?

Please come back & tell us if your problem is resolved.

Report •

June 21, 2011 at 03:05:53
im trying to get all y values appended to txt

Report •

June 21, 2011 at 03:52:38
ive figured it out 3 is the one i need. would be easier to have a way to set delims for a specific order rather than wilodcarding both chars.
if ur intrested in helping the program which the script works with is a clut maker designed on the color graphs u find in paint programs to change to colors of pictures.
however mine for the whole screen so can watch film in psycadelic color.
its almost completed now all i have to do is add a append part to the text and change to hex and im done :).

Report •

Related Solutions

June 21, 2011 at 14:26:44
Here's an untested script which should extract all Y values from the single-line .txt file you quoted. Please amend the output to suit your purpose.

@echo off
setlocal enabledelayedexpansion

FOR /F "tokens=1-4 delims=," %%A IN (xy.txt) DO (
set first=%%B&set first=!first:~2,2!
set secnd=%%C&set secnd=!secnd:~2,2!
set third=%%D&set third=!third:~2,2!
echo !first! !secnd! !third!>test.txt
type test.txt

Good luck with your project.

Please come back & tell us if your problem is resolved.

Report •

Ask Question