3

I need to copy a file/directory structure recursively but without copying file contents (creating 0-length files). Is there any way to do that without custom scripting?

Windows 7

1 Answer 1

11

This should do exactly what you're asking: (edit: no it does not!)

xcopy <source dir> <destination dir> /T /E /O

Edit: This should be closer to what you're looking for:

robocopy <source dir> <destination dir> /E /CREATE

Robocopy should come with Windows 7. Let me know if I got it right this time. :)

3
  • Thank you. I'll look at that more but currently none file is created, only directory structure is copied. Sep 7, 2011 at 12:01
  • @Pavel Vlasov You're right, that command will not create 0-length files like you asked, I missed that requisite. Sorry. Sep 7, 2011 at 12:09
  • @Pavel Vlasov I have edited my answer adding a different solution. Sep 7, 2011 at 12:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .