cmd - batch script for xcopy -


I am trying to create a simple batch script to copy a folder into another folder. Yes of IF% 1 == Goto notification XCOPY% 1D: \ CopyLoc / D / E / C / R / I / K / Y ECHO copied GOTO EXT: INFORM ECHO Usage: CUSTCP & lt; Source Directory & gt; : EXT

I saved this file under Name custcp.cmd .

When I say

  C: \ & gt; Custcp   

I get the message The syntax of the command is incorrect. But what do I need to do display USAGE: CUSTCP & lt; Source Directory & gt; Is there any other novel way of doing this? I also want to know if this command will work for folders in mapped network drives?

PS: This is my first attempt at batch file creation.

Since and & gt; There are redirection letters, the miracle of the batch where you want to redirect the text.

A carat ( ^ ) to close the special meaning of the redirection characters directly, Use, as follows:

  echo usage: CUSTCP ^ & lt; Source directory ^ & gt;    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -