Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: < - standard in  (Read 4223 times)

0 Members and 1 Guest are viewing this topic.

blastman

    Topic Starter


    Hopeful

    < - standard in
    « 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

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



    Dias de verano

    • Guest
    Re: < - standard in
    « 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

    blastman

      Topic Starter


      Hopeful

      Re: < - standard in
      « Reply #2 on: June 15, 2008, 02:48:03 AM »
      arh,


      /p - thats what I needed.

      Cheers boss.

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