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 If-Verzweigung

Empfohlene Antworten

Hallo,

habe eine Frage, wie realisiere ich im Bezug auf einen "CHOICE" Command eine if-Verzweigung? Habe es mal probiert funzt aber nicht, wo ist der Fehler?

CHOICE /C:ZU Waehlen Sie zwischen Zipped und Unzipped?


IF CHOICE==Z GOTO zipped

IF CHOICE==U GOTO unzipped

echo ___________________________________


:unzipped

GOTO finished


:zipped

GOTO finished


:finished

ECHO Vielen Dank fuer Ihr Vertrauen.

PAUSE

EXIT

Kann mir jemand helfen? Hoffe bin hier im richtigen Forum, hatte einfach mal nach "batch" gesucht und die meisten treffer waren hier.

mfg

Christian, 19, K.


@echo off

set /P eingabe= Waehlen Sie zwischen [z]ipped und [u]nzipped


IF /I "%eingabe%" == "z" goto zipped

IF /I "%eingabe%" == "u" goto unzipped


echo ___________________________________


:unzipped

echo unzipped.....

GOTO finished


:zipped

echo zipped.....

GOTO finished


:finished

ECHO Vielen Dank fuer Ihr Vertrauen.

PAUSE

EXIT

choice gibts unter XP nicht mehr :/.. Da musst man glaub ich die %errorlevel% auswerten.

Hallo,

habe aber "choice" nachgeladen, also liegt im gleichen ordner wie die batch datei die "choice.com", daher geht es bei mir doch. Hätte das eigentlich lieber, als "SET", da man dann gleich noch die "Fehlerabfangung" mit drin hat. Denn dann kann ja niemand bsp. "abc" eintippen.

Daher ist meine Frage, wo rein speichert die "CHOICE"-Abfrage ? In die "%choice%" wohl kaum, oder?

mfg

Christian, 19, Kassel

Hallo,

sorry für die späte Antwort, aber welche %errorlevel% gibt es denn? 0 und 1 in meinem fall, oder 1 und 2 ? Sorry blick das echt nicht so ganz =(

Hoffe nochmals um eure Hilfe :)

mfg

Christian, 19, K.

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

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.