DrColgate

Get file size for Shapefile not SHP file

Discussion created by DrColgate on Sep 14, 2011
Latest reply on Nov 29, 2017 by tkowal
I was wondering if there was a way to get file sizes from a shapefile or other multi part spatial file as a single command.

For instance a shapefile is comprised of the several files including SHP, DBF, SHX, etc... and would involve getting info for each of the parts if done using regular Python.  While I can use the os.path.getfilesize('fileName') command it does not take into account the other information that is not specifically the SHP file. 

While it would not be too difficult to write a one off for say a shapefile it would require writing one for each multi part file type in 'ListDatasets'.

Outcomes