Comandos do Robocopy comutadores de anúncios [fechados]

1

Em comandos / interruptores do Robocopy recebemos solicitações para mover um grande número de arquivos e a maioria deles tem datas criadas. A maioria dos arquivos que eles querem remover são arquivos OLD - de 2 / xx / 16 para 5 / xx / 2017. Eles têm nomes de arquivos diferentes. qual é a maneira mais fácil de codificar isso usando o robocopy.

    
por Victor Lopez 23.11.2017 / 00:45

1 resposta

2

O Robocopy tem as opções /MINAGE e /MAXAGE . Use-os para especificar um intervalo de datas para a seleção de arquivos. Consulte o link :

Move files over 14 days old

Move files over 14 days old (note the MOVE option will fail if any files are open and locked).

ROBOCOPY C:\SourceFoldern D:\DestinationFolder /move /minage:14

Similarly you could use the below switches

/maxage: <N> Specifies the maximum file age (to exclude files older than N days or date).
/minage: <N>  Specifies the minimum file age (exclude files newer than N days or date).
/maxlad: <N> Specifies the maximum last access date (excludes files unused since N).
/minlad: <N> Specifies the minimum last access date (excludes files used since N) 
If N is less than 1900, N specifies the number of days. Otherwise, N specifies a date in the format YYYYMMDD
    
por 23.11.2017 / 01:02

Tags