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.

Hilfe bei einem BATCH - STRINGS zerlegen

Empfohlene Antworten

Veröffentlicht

Hey,

ich hänge hier fest:

@echo off
set VOLUME=fsutil volume diskfree F:

pause
%VOLUME%

set VOLUME=%VOLUME:~31,12%

pause

ECHO Beispiel: %VOLUME%
pause[/PHP]

Er sollte eigtl. nun bei [b]ECHO Beispiel: %VOLUME%[/b] die vorher ausgelesenen Daten aus dem String ausgeben.

Er bringt keinen Fehler, kein Syntax-Fehler sondern einfach nur [b]"NICHTS"[/b].

Der ausgelesene komplette String lautet ausserdem:

[b]Gesamtanzahl an freien Bytes : 299809648640

Gesamtanzahl Bytes : 300082855936

Gesamtanz. verfügbarer Bytes : 299809648640[/b]

so far, hoffe mir weiss jmd. ne Hilfe

danke im vorraus

Julian K.

würde ich auch so wie mein Vorredner machen, nicht als Endlösung, aber um zu kucken, ob das wenigstens funktioniert ... von der Syntax her ist dein CMD-Script nämlich i.O.

Das funktioniert so nicht, da die Variable über mehrere Zeilen geht.

Workaround:

Schreibe die Ausgabe in eine temporäre Datei, und lese die dann über eine

for-Schleife wieder aus...


@echo off

set VOLUME=fsutil volume diskfree F:


pause

%VOLUME% |more +2 >%TEMP%\gesVerfBytes.tmp


for /f "delims=" %%i in (%TEMP%\gesVerfBytes.tmp) do set VOLUME=%%i


pause


ECHO Beispiel: %VOLUME%

pause

Ich seh gerade dass du ja die freien Bytes haben möchtest:


@echo off

set VOLUME=fsutil volume diskfree F:


pause

%VOLUME% >%TEMP%\gesFreiBytes.tmp


for /f "delims=: tokens=1*" %%i in (%TEMP%\gesFreiBytes.tmp) do set volume=%%j && goto weiter


:weiter

ECHO Beispiel: %VOLUME%


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.