Я не хочу копировать CCleaner и его содержимое
Какая команда для этой задачи?
Используйте параметр /XD (e X clude Directoryies, соответствующие указанным именам / путям).
robocopy D:\ {dest} /MIR /XD "D:\Programs\DVD IV\FileandDisk\Utilities\CCleaner"
Заметки:
Замените {dest} на (полный или относительный) путь к папке, в которую вы хотите скопировать.
Пример: C:\Backup .
Если {dest} содержит spaces он должен быть заключен в кавычки.
Пример: "C:\My Backup" .
/MIR - это MIR для дерева каталогов - эквивалентно /PURGE плюс все подпапки (/E) (вы, вероятно, также захотите эту опцию).
"D:\Programs\DVD IV\FileandDisk\Utilities\CCleaner" должен быть заключен в кавычки, так как он содержит spaces .
Варианты назначения
/A+:[RASHCNET] : Set file Attribute(s) on destination files + add.
/A-:[RASHCNET] : UnSet file Attribute(s) on destination files - remove.
/FAT : Create destination files using 8.3 FAT file names only.
/CREATE : CREATE directory tree structure + zero-length files only.
/DST : Compensate for one-hour DST time differences.
/PURGE : Delete dest files/folders that no longer exist in source.
/MIR : MIRror a directory tree - equivalent to /PURGE plus all subfolders (/E)
Дополнительные параметры, которые вы, вероятно, никогда не будете использовать
/EFSRAW : Copy any encrypted files using EFS RAW mode.
/MT[:n] : Multithreaded copying, n = no. of threads to use (1-128) #
default = 8 threads, not compatible with /IPG and /EFSRAW
The use of /LOG is recommended for better performance.
/SECFIX : FIX file SECurity on all files, even skipped files.
/TIMFIX : FIX file TIMes on all files, even skipped files.
/XO : eXclude Older - if destination file exists and is the same date
or newer than the source - don’t bother to overwrite it.
/XC : eXclude Changed files
/XN : eXclude Newer files
/XL : eXclude "Lonely" files and dirs (present in source but not destination)
This will prevent any new files being added to the destination.
/XX : eXclude "eXtra" files and dirs (present in destination but not source)
This will prevent any deletions from the destination. (this is the default)
/XF file [file]... : eXclude Files matching given names/paths/wildcards.
/XD dirs [dirs]... : eXclude Directories matching given names/paths.
XF and XD can be used in combination e.g.
ROBOCOPY c:\source d:\dest /XF *.doc *.xls /XD c:\unwanted /S
Исходная робокопия
Дальнейшее чтение