[Tutor] os.remove question

alan.gauld@bt.com alan.gauld@bt.com
Thu Nov 21 12:28:02 2002


> os.remove(listname+'.*')
> to remove all file with a specified name, and ANY 
> nameextension after the period.
> 
> If not, how do I effect this?

Use the glob module to generate the list of files then 
iterate over the list.

Alan g.
Author of the 'Learning to Program' web site
http://www.freenetpages.co.uk/hp/alan.gauld