I'm working on a simple tool that copies files to and from desired locations and I want to replace the print in the CLI with a message of my choosing, I've looked around and so far all solutions I've found don't implement what I'm looking for. Here is a snippet of my code:
@ECHO OFF
ECHO D | XCOPY "%USERPROFILE%\Documents\Visual Studio 2017\Code Snippets" ".\Backup\Code Snippets" /s /q /y
ECHO D | XCOPY "%USERPROFILE%\Documents\Visual Studio 2017\Projects" ".\Backup\Projects" /s /q /y
ECHO D | XCOPY "%USERPROFILE%\Documents\Visual Studio 2017\Templates" ".\Backup\Templates" /s /q /y
I want to make a message display something like "Backup in progress..." instead of each operation showing. I have tried combinations of PRINT
, ECHO
, and even CLS
to replace the window contents but I can't get it to work. What am I missing? I have seen other batch scripts do this (which I no longer have to take notes from) and would like to do the same.