如何使用批处理文件复制文件?

6
我需要创建一个批处理文件,将特定的文件(例如19_1_White.jpg)复制到目录中的文件夹。我应该如何做?
2个回答

18
XCOPY F:\*.* G:\ /C /S /D /Y /I

XCOPY allows for copying of files, directories, and sub directories.
F:\*.* is our source location
G:\ is our destination location
/C tells XCOPY to ignore errors, and finish what can be done
/S tells XCOPY to copy everything including directories and
subdirectories
/D tells XCOPY to only copy source files that are newer than the
destination files (big time saver on the process)
/Y tells XCOPY to overwrite files without asking for confirmation
/I tells XCOPY to automatically create new directories on the
destination, if new directories were created in source.

3

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接