Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Batch: FOR Befehl und Zeilen

Empfohlene Antworten

HI

Habe folgendes Prob ich habe eine TXT Datei mit dem Inhalt:


[COLOR="red"]wert1.rsp

wert2.rsp

wert3.rsp[/COLOR]

...

Ich möchte nun jede Zeile einzeln auslesen und als Parameter einem Programm übergeben, das alles nacheinander abarbeiten soll:

@echo off

test.exe @/Pfad/.../[COLOR="Red"]wert1.rsp[/COLOR]

Der übergebene Wert soll sich ändern bis er in der TXT Datei am Ende angekommen ist.

Soviel ich weiß kann ich das mit einem FOR Befehl lösen nur bekomme ich leider das ganze net hin. Kann mir jemand helfen?

THanks

:uli

habs selber gepackt aber eine FRAGE habe ich noch:

for /F %%i IN (wert.txt) call test.exe @/Pfad/.../wert1.rsp

Das kleine Wort call macht mir probleme.

Jetzt startet er das Programm mit dem Wert1 bricht das ganze aber gleich ab und startet das Programm mit dem Wert2.

Wie sage ich ihm, dass er warten soll bis WERT1 fertig ist?

Hallo, ich hoffe ich kann dir damit helfen.

Du kannst mal versuchen, anstatt call den befehl start zu verwenden.

Da gibt es eine Option /WAIT die wartet, bis das programm beendet wurde.

hoffe das hilft.

Gruß Keith

FOR /F %%i in (wert.txt) DO start /Wait test.exe %%i

ich habe das ganze mit einem Batchfile anstatt einer exe versucht, und ich musste am ende des batch files

noch ein EXIT einfügen, damit das geöffnete Fester wieder geschossen wird umd mit der FOR-Schliefe fortzufahren.

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.