multiple file deletes using ftp.delete

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Drew

    #1

    multiple file deletes using ftp.delete

    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("dre w.*")

    Any help or suggestions would be greatly appreciated.

    Drew Dowling

  • Drew

    #2
    Re: multiple file deletes using ftp.delete

    On Jan 19, 11:16 pm, "Drew" <nospam.notos.. .@gmail.comwrot e:
    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("dre w.*")
    >
    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.

    Comment

    Working...