Find and Delete all files with .xxx extension
Mark McEahern
mark at mceahern.com
Sun Dec 14 10:49:41 EST 2003
More information about the Python-list mailing list
Sun Dec 14 10:49:41 EST 2003
- Previous message (by thread): Find and Delete all files with .xxx extension
- Next message (by thread): Find and Delete all files with .xxx extension
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, 2003-12-14 at 09:06, hokiegal99 wrote:
> > I would say: if fname.lower().endswith( '.mp3' ):
>
> Why the '.lower()' part? Wouldn't if fname.endswith('.mp3'): work just
> as well, or am I missing something here?
Because the filename might be WHATEVER.MP3 and endswith, presumably, is
case-sensitive.
Cheers,
// m
- Previous message (by thread): Find and Delete all files with .xxx extension
- Next message (by thread): Find and Delete all files with .xxx extension
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list