WCM Forum

WCM Forum (http://www.wcm.at/forum/index.php)
-   Programmierung (http://www.wcm.at/forum/forumdisplay.php?f=17)
-   -   text aus datei in varible als batch? (http://www.wcm.at/forum/showthread.php?t=172476)

schmu 23.08.2005 02:55

text aus datei in varible als batch?
 
moin

ich möchte den inhalt einer text datei in eine variable lesen
aus einer batch datei heraus

mein versuch war
type test.txt|set a=

funzt aber nich :mad:
was tun?

helios 23.08.2005 08:35

wenn die textdatei nur eine zeile enthält gehts z.b. so:

Code:

for /f %%i in (test.txt) do set a=%%i
echo %a%


schmu 23.08.2005 09:29

jau das tut, danke :)


Alle Zeitangaben in WEZ +2. Es ist jetzt 12:22 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© 2009 FSL Verlag