Search This Blog

Wednesday, August 23, 2017

Slick

I had a list of 300+ systems. For my disaster recovery documentation, I wanted a Word file for each system. I found this code - https://superuser.com/questions/696504/how-to-create-a-new-document-from-template-via-command-line-using-ms-word-with-a - which says to use this command -

copy NUL "New Document.docx"

which creates a new empty document because, per the link, "In DOS, NUL is in fact a file/device that always contains nothing."

I successfully created 300+ empty files. But then I wanted to know what if I used a Word document that had all of the headings I use in a 'new system' situation and replaced "NUL" with that file name.

I tried it and did a bunch of fist pumps for joy because that worked!

No comments: