Home / Microsoft / Microsoft DOS / < - standard in
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] - (Bottom) Print
Author Topic: < - standard in  (Read 1615 times)
blastman
Topic Starter
Hopeful



Posts: 303


« on: June 14, 2008, 10:46:25 AM »

hey all,

I've forgotten hoe to pull the fist line of a txt file into a variable. I thought it was..

set var=<<C:\test.txt

but it doesn't work!!

All i'm trying to capture is a single word, so it should be nice and easy.

(also I've lost all my old batch files so can't look up whats I've done before.)

Cheers in advance
IP logged


Blastman, you are the man. Thank You Very Much!!!!!!!!!


Dias de verano
Guest
« Reply #1 on: June 14, 2008, 01:51:17 PM »

hey all,

I've forgotten hoe to pull the fist line of a txt file into a variable. I thought it was..

set var=<<C:\test.txt

but it doesn't work!!

Code: [Select]
set /p var=<myfile.txt
IP logged
blastman
Topic Starter
Hopeful



Posts: 303


« Reply #2 on: June 15, 2008, 02:48:03 AM »

arh,


/p - thats what I needed.

Cheers boss.
IP logged


Blastman, you are the man. Thank You Very Much!!!!!!!!!


Pages: [1] - (Top) Print 
Home / Microsoft / Microsoft DOS / < - standard in « previous next »
 


Login with username, password and session length

Old Forum Search | Forum Rules
Copyright © 2010 Computer Hope ® All rights reserved.
Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Page created in 0.105 seconds with 20 queries.