Computing.Net > Forums > Disk Operating System > first word from textfile into var??

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.

first word from textfile into var??

Reply to Message Icon

Name: PeterPOL
Date: July 6, 2006 at 07:15:37 Pacific
OS: Win 98 Se /DOS
CPU/Ram: too old
Product: secret:P
Comment:

I've seen the post with the first line but still don't know how to deal with first word... I have a list with two columns and just want to use the first one (I need first word from each line)



Sponsored Link
Ads by Google

Response Number 1
Name: inverto
Date: July 6, 2006 at 07:33:16 Pacific
Reply:

Not quite sure what you are asking, but M$ have a good tutorial>

http://www.microsoft.com/technet/archive/msdos/07_refer.mspx?mfr=true


0

Response Number 2
Name: Mechanix2Go
Date: July 7, 2006 at 11:32:14 Pacific
Reply:

This will use my.txt and set myvar equal to the first word.


::== set1var.bat
@echo off > d.d

>> d.d echo e 100 '2 '
>> d.d echo rcx
>> d.d echo 2
>> d.d echo n 2
>> d.d echo w
>> d.d echo q

debug < d.d > nul

copy /b 2+my.txt 1.bat > nul
> 2.bat echo set myvar=%%1
call 1
del 1*.*
del 2*.*
del d.d
:: DONE


=====================================
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 Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: first word from textfile into var??

Resolve MX-record from DNS into var www.computing.net/answers/dos/resolve-mxrecord-from-dns-into-var/14698.html

Maintaing spaces when from file www.computing.net/answers/dos/maintaing-spaces-when-from-file/12357.html

read first line from text file www.computing.net/answers/dos/read-first-line-from-text-file/15066.html