title: Download a file to a specific folder with python
body: <p>I am trying to download a particular file to a specific folder on my hardisk. I am using IronPython 2.7 and <code>urllib</code> module.</p>
  
  <p>I tried downloading the file with the following code:</p>
  
  <pre><code>import urllib
  
  response = urllib.urlretrieve(someURL, 'C:/someFolder')
  html = response.read()
  response.close()  
  </code></pre>
  
  <p>But when upper code is ran, I get the following error message:</p>
  
  <pre><code>Runtime error (IOException): Access to the path 'D:\someFolder' is denied.
  Traceback:
  line 91, in urlretrieve, "C:\Program Files\IronPython\Lib\urllib.py"
  line 9, in script
  line 241, in retrieve, "C:\Program Files\IronPython\Lib\urllib.py"
  </code></pre>
  
  <p>I tried entering the Attributes of my "someFolder", and found out the "Read-only" is checked. I unchecked it, clicked "Apply" and "Ok". But when I come back again, "Read-only" is checked again. No matter how many times I uncheck it and confirm, it the "sameFolder" still remains "Read-only".
  Is this the reason why I am getting the upper error message?</p>
  
  <p>Hot to fix it?
  I tried moving the "someFolder" to other partitions, but still for some reason I can not uncheck the "Read-only" attribute (I can, but it just keeps coming back).</p>
  
  <p>Thank you for the reply.</p>
  
  <p>I forgot to say that I use Windows XP 32 bit.</p>
  
  <p>EDIT:
  I checked if "someFolder" is writable and it is. The following code:</p>
  
  <pre><code>print os.access("C:/someFolder", os.W_OK)
  </code></pre>
  
  <p>returns: <code>True</code>.</p>