I've had a look at the switches for XCOPY and can't seem to find one that suppresses the confirmation of the number of files that have been copied.
Do you know if this is possible?
Thanks in advance,
Dave
I've had a look at the switches for XCOPY and can't seem to find one that suppresses the confirmation of the number of files that have been copied.
Do you know if this is possible?
Thanks in advance,
Dave
you can simply send it to nul
:
xcopy source destination options > nul
If you want to see messages about which files are being copied but suppress the final message about how many files were copied, then you can use find:
xcopy source destination options|find /v "File(s) copied"
This will display all lines of output that don't contain the string "File(s) copied". Use the /F option to xcopy to display full source and destination filenames.
xcopy src dst opt |findstr "\\"
, but make sure you have a backslash in the source directory (e.g. use .\src
if you're copying from a local directory). –
Piegari xcopy doesn't handle non-standard characters (e.g., «׃¿) ... use xxcopy instead: xxcopy "G:\Files\" /L /S /ZS
/ZS suppresses all the summary reporting and leaves only the filenames.
You can try this:
xcopy "C:\source_folder\test_file.txt" "C:\destination_folder" /Q > nul
/Q
removes the file name while copying and >nul
removes the prompt ".. File(s) copied"
Just use >nul 2>&1
will supress all the output of the the line.
For example echo Hello World >nul 2>&1
will have no output.
© 2022 - 2024 — McMap. All rights reserved.