Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - devil__

Pages: [1]
1
Software / 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?

Pages: [1]