{"id":685,"date":"2013-12-17T10:23:20","date_gmt":"2013-12-17T10:23:20","guid":{"rendered":"http:\/\/www.sharonmurphy.com\/wordpress\/?p=685"},"modified":"2013-12-17T10:23:20","modified_gmt":"2013-12-17T10:23:20","slug":"windows-directory-listing","status":"publish","type":"post","link":"https:\/\/www.sharonmurphy.com\/wordpress\/2013\/12\/windows-directory-listing\/","title":{"rendered":"Generating a List of Directory Contents on Windows"},"content":{"rendered":"<p>A quick post this morning on a useful bit of command line magic that generates a list of everything in a folder on Windows and writes it to a file &#8212; this comes in useful for install\/upgrade documentation and the like, or even just for project tracking and reporting.<\/p>\n<p><!--more--><\/p>\n<ol>\n<li>Open a command prompt window (<strong>cmd<\/strong>).<\/li>\n<li>Switch to the folder you want to print a contents listing for (<strong>cd a\/b\/c<\/strong>).<\/li>\n<li>Type\u00a0<strong>dir &gt;dirlist.txt<\/strong> and hit <strong>Return<\/strong> to run the <strong>dir<\/strong> command, which lists the folder contents, then dump the results into a file called <strong>dirlist.txt<\/strong> in the same folder.<br \/>\nThat&#8217;s it &#8212; job done!<\/li>\n<\/ol>\n<p><strong>Notes:<\/strong><\/p>\n<ul>\n<li>To create the output file elsewhere, give an absolute\/relative path along with the filename.<\/li>\n<li>To include the contents of sub-folders, modifying the command to:<br \/>\n<strong>dir \/s &gt;dirlist.txt<\/strong><\/li>\n<li>To see other options that can be used with <strong>dir<\/strong>, view the online help by typing:<br \/>\n<strong>dir \/?<\/strong><\/li>\n<\/ul>\n<p><strong>\u00a0<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A quick post this morning on a useful bit of command line magic that generates a list of everything in a folder on Windows and writes it to a file &#8212; this comes in useful for install\/upgrade documentation and the like, or even just for project tracking and reporting.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-685","post","type-post","status-publish","format-standard","hentry","category-tech-writing"],"_links":{"self":[{"href":"https:\/\/www.sharonmurphy.com\/wordpress\/wp-json\/wp\/v2\/posts\/685","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sharonmurphy.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sharonmurphy.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sharonmurphy.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sharonmurphy.com\/wordpress\/wp-json\/wp\/v2\/comments?post=685"}],"version-history":[{"count":3,"href":"https:\/\/www.sharonmurphy.com\/wordpress\/wp-json\/wp\/v2\/posts\/685\/revisions"}],"predecessor-version":[{"id":688,"href":"https:\/\/www.sharonmurphy.com\/wordpress\/wp-json\/wp\/v2\/posts\/685\/revisions\/688"}],"wp:attachment":[{"href":"https:\/\/www.sharonmurphy.com\/wordpress\/wp-json\/wp\/v2\/media?parent=685"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sharonmurphy.com\/wordpress\/wp-json\/wp\/v2\/categories?post=685"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sharonmurphy.com\/wordpress\/wp-json\/wp\/v2\/tags?post=685"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}