Find and Delete all files with .xxx extension

Thomas Heller theller at python.net
Wed Dec 17 22:07:39 CET 2003


Derrick 'dman' Hudson <dman at dman13.dyndns.org> writes:

> On 16 Dec 2003 19:12:34 -0800, hokiegal99 wrote:
>> William Park <opengeometry at yahoo.ca> wrote in message news:<brntu1$5c6a8$1 at ID-99293.news.uni-berlin.de>...
>>> Heike C. Zimmerer <usenet03q2 at hczim.de> wrote:
>>> > William Park <opengeometry at yahoo.ca> writes:
>
>>> > > FYI, in shell, you would go
>>> > >     find . -type f -name '*.mp3' | xargs rm
>>> > 
>>> > Which will fail if the file name contains any spaces or other special
>>> > characters (not too unusual for .mp3 - Files).
>>> 
>>> In which case, you look up 'man find xargs' and edit the command to
>>>     find ... -print0 | xargs -0 ...
>> 
>> What would you man on a Windows box???
>
> Start by clicking
>     Start -> Programs -> Cygwin -> Bash Shell

No, enter 'del /s *.mp3' at the command prompt.
If you are running windows, you should know it.




More information about the Python-list mailing list