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.

xcopy Batchfile

Empfohlene Antworten

Veröffentlicht

Ich bräuchte eine Batch Datei, die von einem Shared (Server1) sagen wir "\\server1\blabla" auf denanderen Shared (Server2) "\\server2\blabla" den Folder mit Unterverzeichnissen und Dateien kopiert.

Der Kopiervorgang soll bei Fehlern nicht abgebrochen werden, sondern nur die nicht kopierten Dateien in einem Logfile ausgeben.

Das Batchfile soll auf einem der beiden Server abgelegt und ausgeführt werden. Es sind 2 voneinander unabhängige Server mit unterschiedlichen Logins.

Ich hab mich mal selbst an der Batch versucht, weiss aber nicth ob das so klappt:

@echo off

xcopy \\server1\x$\test \\server2\x$\\test /C /E /I

IF ERRORLEVEL 1 goto log_warning

ELSE goto no_warning

:log_warning

>f:\E\failedcopy.log

:no_warning

>f:\E\successfulcopy.log

Kann mir einer helfen?

Wäre dankbar...

Grüße

:no_warning

>f:\E\successfulcopy.log

Du kannst in der Zeile nicht mehr den Ausgabestrom von xcopy in eine Datei umlenken. Das geht nur direkt nach dem Befehl.

Probier es mal hiermit:


@echo off

robocopy.exe \\server1\x$\test \\server2\x$\\test /MIR /LOG:LOGDATEI.log /V


SET /a fehler=0 

FOR /f "tokens=7" %%i IN ('findstr /C:"Files :" LOGDATEI.log') DO SET /a fehler+=%%i 

IF %fehler% == 0 goto :eof 

echo %fehler% Fehler beim Kopiervorgang aufgetreten...


:eof


FIND /I "ERROR" LOGDATEI.log

(robocopy.exe findest du entweder irgendwo bei google oder in dem Windows 2003 Server Resource Kit.)

Bearbeitet von lupo49

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.