title: Not able to save the file in custom path directory using Python Telegram bot
body: <p>I'm downloading files using the Telegram bot, and my current code looks like this:</p>
  <pre><code>def file_handler(Update, context: CallbackContext):
      file = context.bot.getFile(Update.message.document.file_id)
      print(&quot;file_id: &quot; + str(Update.message.document.file_id))
      file.download(custom_path='C:/Users/User/Desktop/python/projects/Telegram-Database/files')
  
  def main():
      updater = Updater(token, use_context=True)
      dispatcher = updater.dispatcher
      dispatcher.add_handler(MessageHandler(Filters.document, file_handler))
      updater.start_polling()
      updater.idle()
  
  if __name__ == '__main__':
      main()
  </code></pre>
  <p>And when I do this:</p>
  <pre><code>file.download()
  </code></pre>
  <p>It downloads the file in the current directory, but I want to download all the files in the folder. So I looked up the documentation here: <a href="https://python-telegram-bot.readthedocs.io/en/stable/telegram.file.html" rel="nofollow noreferrer">https://python-telegram-bot.readthedocs.io/en/stable/telegram.file.html</a>, and indeed I can set custom path to download the files in that folder. However, when I use my current code, I get a permission error:</p>
  <pre><code>    with open(filename, 'wb') as fobj:
  PermissionError: [Errno 13] Permission denied: 'C:/Users/User/Desktop/python/projects/Telegram-Database/files'
  </code></pre>
  <p>And I'm not sure why. I tried re-creating the folder and re-start the program, but I always get the same error. I looked for this specific error in the Telegram bot, but nothing shows up. Can you please help?</p>