multiple file deletes using ftp.delete

D

Drew

Hi all
I'm fairly new to python so please forgive my lack of comprehension of
the obvious.

I'm writing a script to ftp files to a server. This script will run
weekly. Part of the script first deletes the previous weeks files. The
problem is I'm never sure of the exact number and full name of the
files that need to be deleted. All the files start with the same string
but have different extensions (eg drew.1 drew.2 drew.tmp drew.hlp). So
I was wondering if anybody knows how to use a wild card similar to * in
UNIX to do the delete? Something like:

ftp.delete("drew.*")

Any help or suggestions would be greatly appreciated.

Drew Dowling
 
D

Drew

Hi all
I'm fairly new to python so please forgive my lack of comprehension of
the obvious.

I'm writing a script to ftp files to a server. This script will run
weekly. Part of the script first deletes the previous weeks files. The
problem is I'm never sure of the exact number and full name of the
files that need to be deleted. All the files start with the same string
but have different extensions (eg drew.1 drew.2 drew.tmp drew.hlp). So
I was wondering if anybody knows how to use a wild card similar to * in
UNIX to do the delete? Something like:

ftp.delete("drew.*")

Any help or suggestions would be greatly appreciated.

Drew Dowling

I should have summed if up thus: I'm trying to find a way to issue the
ftp mdelete command in python.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top