Suppress 1 file(s) copied.

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
flywire
Posts: 17
Joined: 14 Feb 2018 03:10

Suppress 1 file(s) copied.

#1 Post by flywire » 18 Jul 2020 03:18

Can I suppress the `1 file(s) copied.` output from a single line command that prepending the output from another program?

Code: Select all

>echo demo > new.txt & copy /y new.txt demo.* & vol >> demo.txt
        1 file(s) copied.
(" echo demo > new.txt &" is only to create file for the demonstration.)

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Suppress 1 file(s) copied.

#2 Post by aGerman » 18 Jul 2020 05:14

Not sure I got it. So you only want to redirect the output of the copy command to nul in order to get rid of it, right?

Code: Select all

>echo demo > new.txt & (>nul copy /y new.txt demo.*) & vol >> demo.txt
Steffen

flywire
Posts: 17
Joined: 14 Feb 2018 03:10

Re: Suppress 1 file(s) copied.

#3 Post by flywire » 18 Jul 2020 05:35

Don't worry, you got it. Much appreciated.

Actual use case starts at "(>nul copy ..."

Post Reply