{"id":2328,"date":"2016-07-03T13:22:02","date_gmt":"2016-07-03T13:22:02","guid":{"rendered":"https:\/\/grindgis.com\/?p=2328"},"modified":"2017-05-25T04:22:04","modified_gmt":"2017-05-25T04:22:04","slug":"no-code-to-count-gis-files","status":"publish","type":"post","link":"https:\/\/grindgis.com\/?p=2328","title":{"rendered":"No Code Required to Count Shapefiles or GIS Files in a Folder"},"content":{"rendered":"<p>There are different codes available in internet for counting GIS files but the method I am going to demonstrate you is simple and does not require any coding or no knowledge of python script. You just need few DOS command and Microsoft Excel software. You can do all kinds of analysis on excel sheet after importing list of shapefiles. On the below image you will notice I have different types of files; shapefiles, excel files and geodatabase files. So our target is to create a list of files with their name and extension in a excel sheet.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"https:\/\/grindgis.com\/wp-content\/uploads\/2016\/07\/070316_1326_NoCodeRequi1.png\" alt=\"No coding required example\" width=\"625\" height=\"451\" \/><\/p>\n<p style=\"text-align: justify;\"><span style=\"color: black; font-family: Arial; font-size: 25pt; background-color: white;\"><strong>1. <\/strong><\/span>First step is to open the DOS command window, go to Start &gt; All Programs &gt; Accessories &gt; Command Prompt on Windows 7 premium. Or shortcut way is to type <strong>CMD<\/strong> on the search box.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"https:\/\/grindgis.com\/wp-content\/uploads\/2016\/07\/070316_1326_NoCodeRequi2.png\" alt=\"Command window\" width=\"282\" height=\"142\" \/><\/p>\n<p><span style=\"color: black; font-family: Arial; font-size: 25pt; background-color: white;\"><strong>2. <\/strong><\/span>Now use the <strong>CD <\/strong>DOS command to add your directory (<a href=\"http:\/\/www.colorado.edu\/geography\/gcraft\/tips\/doshelp.html\">DOS basics<\/a>). Note, use <strong>CD..<\/strong> Command to clear directories. Below image shows the directory that I will be counting files.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"https:\/\/grindgis.com\/wp-content\/uploads\/2016\/07\/070316_1326_NoCodeRequi3.png\" alt=\"CD added directory\" width=\"463\" height=\"18\" align=\"left\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: black; font-family: Arial; font-size: 25pt; background-color: white;\"><strong>3. <\/strong><\/span>Now type the <strong>dir \/b &gt; mylist.txt <\/strong>on the command window at the end and press Enter which will create mylist.txt files inside the shapefile folder. This txt file will be later imported to Excel.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"https:\/\/grindgis.com\/wp-content\/uploads\/2016\/07\/070316_1326_NoCodeRequi4.png\" alt=\"CD added directory option 2\" width=\"464\" height=\"23\" align=\"left\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Few other Commands:<br \/>\n<\/strong><\/p>\n<p><span style=\"color: black;\"><strong>dir\/b &gt; mylist.txt,<\/strong> create list containing files names only.<br \/>\n<\/span><\/p>\n<p><span style=\"color: black;\"><strong>dir\/b &gt; mylist.txt,<\/strong> create list with file size and dates.<br \/>\n<\/span><\/p>\n<p><span style=\"color: black;\"><strong>dir\/b\/s &gt; mylist.txt<\/strong>, create list including files in the sub-directories<br \/>\n<\/span><\/p>\n<p><span style=\"color: black; font-family: Arial; font-size: 25pt; background-color: white;\"><strong>4. <\/strong><\/span>File called mylist.txt is created on the shapefile folder<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"https:\/\/grindgis.com\/wp-content\/uploads\/2016\/07\/070316_1326_NoCodeRequi5.png\" alt=\"list file type\" width=\"160\" height=\"48\" \/><\/p>\n<p><span style=\"color: #00b050; font-size: 24pt;\"><strong>OR<br \/>\n<\/strong><\/span><\/p>\n<p>You can directly create xls file instead of txt file (<span style=\"color: black;\"><strong>dir\/b &gt; mylist.xls<\/strong><\/span>). This will create excel file (mylist.xls) then you can avoid step 5.<\/p>\n<p><span style=\"color: black; font-family: Arial; font-size: 25pt; background-color: white;\"><strong>5. <\/strong><\/span>Now open the Microsoft Excel and import the mylisit.txt file, then click finish to create a list.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"https:\/\/grindgis.com\/wp-content\/uploads\/2016\/07\/070316_1326_NoCodeRequi6.png\" alt=\"export my list\" width=\"555\" height=\"180\" \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"https:\/\/grindgis.com\/wp-content\/uploads\/2016\/07\/070316_1326_NoCodeRequi7.png\" alt=\"Text import Microsoft excel\" width=\"555\" height=\"416\" \/><\/p>\n<p><span style=\"color: black; font-family: Arial; font-size: 25pt; background-color: white;\"><strong>6. <\/strong><\/span>You will have a excel sheets with a list of shapefiles and you can use it to clean the data.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are different codes available in internet for counting GIS files but the method I am going to demonstrate you is simple and does not require any coding or no knowledge of python script. You just need few DOS command and Microsoft Excel software. You can do all kinds of analysis on excel sheet after [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2362,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[104],"tags":[413,410,412,411,409],"class_list":["post-2328","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-count-shapefiles","tag-counting-gis-files","tag-dos-command","tag-no-code","tag-no-pyhton","entry","has-media"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/grindgis.com\/index.php?rest_route=\/wp\/v2\/posts\/2328","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/grindgis.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/grindgis.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/grindgis.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/grindgis.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2328"}],"version-history":[{"count":0,"href":"https:\/\/grindgis.com\/index.php?rest_route=\/wp\/v2\/posts\/2328\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/grindgis.com\/index.php?rest_route=\/wp\/v2\/media\/2362"}],"wp:attachment":[{"href":"https:\/\/grindgis.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2328"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/grindgis.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2328"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/grindgis.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2328"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}