Richard Querin wrote: > I know this is probably a dumb question: > > I've got mp3 files that are downloaded (by ipodder) into individual > subfolders. I'd like to write a quick script to move (not copy) all the > mp3 files in those folders into a single destination folder. I was > thinking I could do it easily from the linux command line (cp -r copies > the subfolders out as well) but I can't figure out how to do it. Is > there an easy way to achieve this using Python? I am assuming this would > be something Python was designed to make easy..
Python's not always the best with complex manipulations like that. You could use os.path.walk, but here's the same thing in bash: find $IPODDER_DIR -type f -exec mv \{} $DEST_DIR \; Dustin _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor