title: Python - get a size of a network path folder
body: <p>I'm using Python 2.7 to monitor disk usage of some application running on Windows 2012 server. How can I get a size of some network storage folder located for example here: </p>
  
  <pre><code>\\storage\my_folder\
  </code></pre>
  
  <p>I've tried to use (from this post: <a href="https://stackoverflow.com/questions/1392413/calculating-a-directory-size-using-python">calculating-a-directory-size-using-python</a> ):  </p>
  
  <pre><code>import os
  
  def getFolderSize(folder):
      total_size = os.path.getsize(folder)
      for item in os.listdir(folder):
          itempath = os.path.join(folder, item)
          if os.path.isfile(itempath):
              total_size += os.path.getsize(itempath)
          elif os.path.isdir(itempath):
              total_size += getFolderSize(itempath)
      return total_size
  </code></pre>
  
  <p>but of course network path is not supported.</p>