Wie kann ich den Fortschritt des XCopy-Befehls während der Ausführung verfolgen?

8163
ChrisinAK

OPSYS: Win10Pro 64 Bit

RAM: 10 GB

Ich habe eine Batchdatei erstellt, die ich auf dem Desktop des lokalen Administratorkontos gespeichert habe.

Die Batch-Datei-Befehlszeile lautet:

xcopy "F:\movies" "L:\movies" /d 

I then created a Task Schedule in Task Scheduler to run the batch file.

I am now running it and do not see it running, other than when I refresh tasks in Task Scheduler Library view. There I see it and it says 'Running'.

I am concerned that I do not see any kind of progress bar and I would like to see that. Does anyone know if this can be done?

3
Ich entschuldige mich für das Fehlen von Informationen. Ich habe auch bemerkt, dass die Datei, die nicht kopiert wird, schreibgeschützt ist. Könnte das ein Problem sein? ChrisinAK vor 6 Jahren 0

2 Antworten auf die Frage

1
TOOGAM

If you are using software someone else made (like XCOPY) then the only easy route is to just end up being limited to whatever functionality was placed in there by the people who made that software. Workarounds may exist (like jorgediaz-lr's answer... another possibility may be to look at free space on the destination drive, if you know how much is going to be copied), but your easiest workaround may be to try using other software. Remember, XCOPY was made in the days when having the /S switch to include subdirectories was considered to be an advanced feature, because COPY didn't have that ability.

In the spirit of considering the XY problem, I point out that in Windows 10, you can check out the built-in Robocopy. (If you can't see the program running, Robocopy also supports outputting to a log, which might be suitably helpful.)

I notice your /d option to XCOPY, which looks like is designed to just copy new files.

Although Robocopy has some options starting with /I to include some types of files, there isn't an option starting with /I, for including just new files... instead, the option that accomplishes this basic tasks will be the one that specifies to exclude old files. (/XO)

robocopy "F:\movies" "L:\movies" /XO

Avoid /NP (show mp progress display), maybe use /ETA (show estimated time of arrival).

Interessanter Kommentar. Ich dachte, dass xcopy ein Teil der Windows-Tools ist. der Schalter / l ist L nicht ein i, obwohl ich jetzt L in Kleinschreibung, d und i als Schalter dafür habe. / l sollte die zu kopierenden Dateien anzeigen, während / i davon ausgeht, dass das Ziel ein Ordner ist. Ich kann an dieser Stelle immer noch nicht mit der Batch-Datei kopieren. Wirklich frustrierend, weil es andere Dateien gut kopiert hat. ChrisinAK vor 6 Jahren 0
Das hat funktioniert, aber ich musste in die Batch-Datei jeden einzelnen Ordner unter dem Hauptordner schreiben, um anstelle des *. * Kopiert zu werden. Gibt es eine andere Möglichkeit, dies zu schreiben, um alle Unterordner zu erhalten, ohne für jeden eine Zeile schreiben zu müssen? Ist auch der / ETA-Schalter, um den Fortschritt zu sehen oder ....? ChrisinAK vor 6 Jahren 0
Wenn Sie ein `/ E` hinzufügen, kopieren Sie Unterverzeichnisse (einschließlich leerer). Gehen Sie zu einer Eingabeaufforderung und führen Sie `Robocopy /? Aus. >> robohelp.txt` (und öffnen Sie dann die Textdatei robohelp.txt). Ich denke, dass '/ ETA` wahrscheinlich den Fortschritt verändert, aber es klingt, als wären Sie in einer ebenso guten Lage, das zu testen, so wie ich bin. TOOGAM vor 6 Jahren 0
0
jorgediaz-lr

You can use Process Explorer http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx

That application allows seeing which files are open by any process, so you can check the opened files by xcopy

Was ich suche, ist eine Möglichkeit, den Fortschritt der Kopie anzuzeigen, während sie auftritt. Ich bin gerade auf ein anderes Problem gestoßen, das ich vorher nicht bemerkt habe: Die Sicherung wird jetzt nicht gesichert, nachdem die Batchdatei geändert wurde: "xcopy "F: \ *. *" "L:" / d / l / i ChrisinAK vor 6 Jahren 0