title: Open pdf files format with python
body: <p>I try to open 100 pdf files with python 2.7 with this code:</p>
  
  <pre><code>import arcpy,fnmatch,os
  
  rootPath = r"D:\desktop"
  pattern = '*.pdf'
  counter = 0
  for root, dirs, files in os.walk(rootPath):
      for filename in fnmatch.filter(files, pattern):
          os.startfile(rootPath)
          counter = counter + 1
  print counter
  </code></pre>
  
  <p>as a result the rootPath folder opened and python print the number of pdf files:</p>
  
  <pre><code>&gt;&gt;&gt; 
  39
  &gt;&gt;&gt; 
  </code></pre>
  
  <p>No pdf files opened. I search in the forum and didn't find any question with answers to my request. Thanks for any help  </p>