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: XCOPY

Empfohlene Antworten

Veröffentlicht

Hallo Leute,

wer kann mir helfen? (Bin ein totaler Anfänger in diesem Gebiet)!! :confused:

Kunde sichert seit Jahren schon seine Festplatten mit dem Befehl XCOPY!

Vor 8Wochen hatte er einen Festplattencrach! Und was war, xcopy konnte nicht ausgeführt werden, da die Festplatte zu klein war!

Jetzt hat er den wunsch, das ich ihm in eine TXT Datei schreibe, ob die BatchDatei "Erfolgreich" oder "Nicht erfolgreich" Ausgeführt wurde! Soll so aussehen:

DATUM TIME ERFOLGREICH

DATUM TIME NICHT ERFOLGREICH

Was kann ich machen?

Momentane BatchDatei:

@echo off

rem call c:\recycle.bat

echo Aktualisierung der Daten von Novell auf den Server_NT

xcopy /d /e /f /c /i /h /r /k F:\ D:\backup\Samstag

Vielen Dank für eure hilfe!

Gruß

choasman!

Du mußt eigentlich nur den Exit-Code des xcopy-Befehls ermitteln und dann entsprechend darauf reagieren.

Etwa so (ungetestet):

IF ERRORLEVEL 0 GOTO ok

IF ERRORLEVEL 1 GOTO nok

IF ERRORLEVEL 2 GOTO nok

IF ERRORLEVEL 4 GOTO nok

IF ERRORLEVEL 5 GOTO nok


:ok

(Befehl)

GOTO end


:nok

(Befehl)

GOTO end


:end

[Edit]Die Exit-Codes von xcopy gibt es hier.[/Edit]

Im Prinzip richtig, aber "IF ERRORLEVEL 0" ist in einer Batchdatei wahr, wenn der Errorlevel größer oder gleich 0 ist - also immer. Du müsstest also zuerst auf Errorlevel >= 1 prüfen.

Oder so:

IF %ERRORLEVEL% EQU 0 GOTO ok

IF %ERRORLEVEL% GEQ 1 GOTO nok

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.