Mathias F
Mathias F

Reputation: 15921

Copy files but set filesize 0

I need to copy files from a source directory to a target directory.

On the target directory I don't need the actual content. Its only important that the files exist.

How can I copy files but set them to have an empty (0 byte) content?

Upvotes: 1

Views: 2969

Answers (1)

Alex Tartan
Alex Tartan

Reputation: 6836

According to the docs, you can use this option:

/create Creates a directory tree and zero-length files only.

This option does not copy the contents, but only the structure.

Upvotes: 2

Related Questions