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.
1. First step is to open the DOS command window, go to Start > All Programs > Accessories > Command Prompt on Windows 7 premium. Or shortcut way is to type CMD on the search box.
2. Now use the CD DOS command to add your directory (DOS basics). Note, use CD.. Command to clear directories. Below image shows the directory that I will be counting files.
3. Now type the dir /b > mylist.txt 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.
Few other Commands:
dir/b > mylist.txt, create list containing files names only.
dir/b > mylist.txt, create list with file size and dates.
dir/b/s > mylist.txt, create list including files in the sub-directories
4. File called mylist.txt is created on the shapefile folder
OR
You can directly create xls file instead of txt file (dir/b > mylist.xls). This will create excel file (mylist.xls) then you can avoid step 5.
5. Now open the Microsoft Excel and import the mylisit.txt file, then click finish to create a list.
6. You will have a excel sheets with a list of shapefiles and you can use it to clean the data.