4

Is there any way to exclude copying of empty files (0 bytes) using robocopy command?

I have a source with thousands of empty files besides other files and destination also have same file names but not empty. I want to copy everything from source to destination except empty files.

miroxlav
  • 11,796
  • 5
  • 58
  • 99
user5218171
  • 41
  • 1
  • 2

2 Answers2

3

Include command line switch /MIN:1 what instructs Robocopy to ignore all files smaller than 1 byte.

From documentation:

/MIN:n : MINimum file size - exclude files smaller than n bytes.

miroxlav
  • 11,796
  • 5
  • 58
  • 99
0

According to Robocopy documentation you should try to simply add /min: 1to your arguments

Supamiu
  • 8,501
  • 7
  • 42
  • 76