Computing.Net > Forums > Programming > DOS batch split ; delimited text

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

DOS batch split ; delimited text

Reply to Message Icon

Name: bismarkcount
Date: August 8, 2007 at 14:39:39 Pacific
OS: windows xp
CPU/Ram: intel c2d
Product: dell
Comment:

hi!!!

could you please help me in this??

i have a ";" delimited text like this:

name1@mail.com;name2@mail.com;name3@mail.com

i want to extract the first email (before the first separator) into a variable.

i guess it is simple, but i am new at DOS bat programming.

thnx for your help



Sponsored Link
Ads by Google

Response Number 1
Name: Razor2.3
Date: August 8, 2007 at 14:51:15 Pacific
Reply:

FOR /F "delims=;" %a IN ("name1@mail.com;name2@mail.com;name3@mail.com") DO @ECHO %a


0

Response Number 2
Name: bismarkcount
Date: August 8, 2007 at 15:00:07 Pacific
Reply:

that doesnt seem to work for me razor... it shows me an error saying:

a was unexpected at this time

d u know if it might be because of my operating system?? i am running on WinXP


0

Response Number 3
Name: bismarkcount
Date: August 8, 2007 at 15:05:17 Pacific
Reply:

ohh, thnx i have solved... it was just %%a instead of %a

thnx razor!!!
have a good day!


0

Response Number 4
Name: Mechanix2Go
Date: August 8, 2007 at 15:10:55 Pacific
Reply:

Razor2.3's code worls at the prompt. To use it in a BAT, use double %.

::==
FOR /F "delims=;" %%a IN ("name1@mail.com;name2@mail.com;name3@mail.com") DO @ECHO %%a


=====================================
If at first you don't succeed, you're about average.

M2



0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: DOS batch split ; delimited text

For loop in DOS batch program www.computing.net/answers/programming/for-loop-in-dos-batch-program/18227.html

Batch file entering text www.computing.net/answers/programming/batch-file-entering-text/18276.html

Batch file pasting text www.computing.net/answers/programming/batch-file-pasting-text/18760.html