Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Download files from WebDav with Python

Posted on 2004-08-10
4
Medium Priority
?
289 Views
Last Modified: 2010-04-16
Hello all,
I am trying to download files from a WebDav server that is using https.
Does anyone how I can accomplish this using Python or some other
script.  I want to download a file, rename on the server, then move it to a directory and
rename it there also.
Thanks,
Jason
0
Comment
Question by:kochsqlserv
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 9

Accepted Solution

by:
rjkimble earned 300 total points
ID: 11769289
This page looks promising:

http://www.lyra.org/greg/python/

I assume you plan to program this yourself.
0
 
LVL 7

Assisted Solution

by:BarryTice
BarryTice earned 300 total points
ID: 12070111
import urllib
sourceURL1 = 'http://www.experts-exchange.com/Programming/Programming_Languages/Python/Q_21088729.html'
targetFilePath1 = 'new_file_path_and_name.html'
nf = urllib.urlretrieve(sourceURL1, targetFilePath1)
sourceURL2 = 'http://www.experts-exchange.com/images/pe/166149.jpg'
targetFilePath2 = 'mugshot_of_ramrom.jpg'
nf = urllib.urlretrieve(sourceURL2, targetFilePath2)

This won't rename the file on the server, but it will allow you to get a file from an http server and save it to whatever path as whatever filename you like. A brief test with https://www.paypal.com/cgi-bin/webscr?cmd=_login-run suggests it runs with https as well.

Hope this helps...

-- b.r.t.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question