Eu não quero copiar o CCleaner e seu conteúdo
What is the command for this task?
Use a opção /XD
(e X diretórios clui correspondência de nomes / caminhos dados).
robocopy D:\ {dest} /MIR /XD "D:\Programs\DVD IV\FileandDisk\Utilities\CCleaner"
Notas:
-
Substitua
{dest}
pelo nome do caminho (completo ou relativo) da pasta para a qual você deseja copiar.Exemplo:
C:\Backup
. -
Se
{dest}
contiverspaces
, deve ser citado.Exemplo:
"C:\My Backup"
. -
/MIR
é MIR ror uma árvore de diretórios - equivalente a/PURGE
mais todas as subpastas(/E)
(provavelmente você também deseja essa opção). -
"D:\Programs\DVD IV\FileandDisk\Utilities\CCleaner"
deve ser citado, pois contémspaces
.
Opções de destino
/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)
Advanced options you'll probably never use
/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
Fonte robocopy
Leitura Adicional
- Um índice A-Z da linha de comando do Windows CMD - Uma excelente referência para todas as coisas relacionadas à linha do Windows cmd.
- robocopy - Cópia robusta de arquivos e pastas.