Author Topic: Easy .bat scripting help needed  (Read 739 times)

Offline devil__

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Easy .bat scripting help needed
« on: April 04, 2004, 09:26:14 AM »
Hello
I have a question, I need to remove the line breaks from a file, and read in the entire file (without linebreaks) to a varible. But I just can't get it to work.

FOR /F "tokens=1" %%i IN (e:\winnt\system32\svchost1.txt) DO (
%%i
)

Would echo the entire file.. But I need to put the entire file (all lines) into one variable (maybe seperate the lines with a <> or something)

I thought about having:
set temp=1
FOR /F "tokens=1" %%i IN (e:\winnt\system32\svchost1.txt) DO (
set temp=%temp% <> %%1
)

Because I thought this could work, but it didnt..

Any suggestions?