How do I make a Windows batch script completely silent?

后端 未结 5 1822
天涯浪人
天涯浪人 2020-12-13 03:33

There has been variants of this question asked for generations, but despite writing some quite complicated Windows scripts, I can\'t seem to find out how to make them actual

5条回答
  •  天命终不由人
    2020-12-13 04:20

    Copies a directory named html & all its contents to a destination directory in silent mode. If the destination directory is not present it will still create it.

    @echo off
    TITLE Copy Folder with Contents
    
    set SOURCE=C:\labs
    set DESTINATION=C:\Users\MyUser\Desktop\html
    
    xcopy %SOURCE%\html\* %DESTINATION%\* /s /e /i /Y >NUL
    

    1. /S Copies directories and subdirectories except empty ones.

    2. /E Copies directories and subdirectories, including empty ones. Same as /S /E. May be used to modify /T.

    3. /I If destination does not exist and copying more than one file, assumes that destination must be a directory.

    4. /Y Suppresses prompting to confirm you want to overwrite an existing destination file.

提交回复
热议问题