Tuesday, 31 March 2015

How to recreate a windows folder and file structure with empty (zero byte) files

I have an external drive full content that I reference only periodically. I don’t connect the drive regularly to my laptop but I often want to know if a file is on that drive. I recently thought it would be helpful to have a zero-byte copy of the drive contents on my local machine.

Although I thought about writing a PowerShell script to accomplish this, robocopy includes a feature to do exactly what I want through the /Create command:

robocopy source dest /E /Create

Robocopy has been bundled with Windows since Vista.

No comments:

Post a comment

Spam comments will be deleted

Note: only a member of this blog may post a comment.