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.

windows batch script auswahl schleife

Empfohlene Antworten

Veröffentlicht

hallöle,

ist es möglich in einer batch eine switch schleife auszuführen oder eine andere art von auswahlmöglichkeit zu treffen?

beispiel:

echo Konfiguration korrekt (J/N)?

set /p error=

cls

switch (%error%)

case J*:

case j*:

case Y*:

case y*:

echo Das Netzlaufwerk wird verbunden...

goto start

breaksw

case n*

case N*

echo Eingaben waren nicht korrekt...

goto restart

breaksw

default:

echo Ein Satz mit X...das war wohl nix!

endsw

cmd meldet das er switch und case nicht kennt!

:(

hat da jemand das know how mir ein wenig hilfestellung zu geben ;)

thx im vorraus!

grüße dave

hier mal ein Entwurf:

@echo off

:0

echo Konfiguration korrekt (J/N)?


SET choice=

SET /p choice=


if '%choice%' == 'j' goto ja

if '%choice%' == 'J' goto ja

if '%choice%' == 'Y' goto ja 

if '%choice%' == 'y' goto ja 

if '%choice%' == 'n' goto nein

if '%choice%' == 'N' goto nein


ECHO Falsche Eingabe. Bitte erneut versuchen

GOTO :0


:ja

echo Das Netzlaufwerk wird verbunden...

pause

goto ende


:nein

echo Eingaben waren nicht korrekt...

pause

goto ende


:ende

exit


das ging ja flott

danke erax!!!

werd das gleichmal testen

...

super!!! absolut brillant ;)

THX

Bearbeitet von onkeldave

close

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.