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-Datei mit Benutzereingabe

Empfohlene Antworten

Veröffentlicht

Hallo zusammen!

Ich habe keine Ahnung von Batch-Programmierung und weiß auch nicht, in welches Forum das gehört. Ich hab nun folgendes Problem:

Ich möchte eine Batch-Datei schreiben, an die der Benutzer einen kompletten Pfad übergeben kann. Der Pfadname kann auch Leerzeichen enthalten wie bei "Eigene Dateien". Ich hatte mir das so vorgestellt, dass ich dann mit %1 den Pfad auslesen kann und somit weiß, welche Datei der Benutzer ausgewählt hat.

Kann man das überhaupt in einer Batch-Datei und wenn ja, wie wird die Benutzereingabe realisiert?

Grundsätzlich funktioniert eine Übergabe von Pfadangaben. Du hängst einfach den Pfad der Datei, die übergeben werden soll, hinter den Aufruf der Batch-Datei. So könnte der Aufruf aussehen:

Batchdatei.bat "C:\Programme\Schicker Ordner\SchickeDatei.txt"

In der Batchdatei ist die Eingabe dann per %%1 Auszulesen. Hängst Du weitere Variablen ran, sind diese über %%2, %%3 etc. auszulesen.

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.