KraftDiner wrote:
> Hi I need help writing a python script that traverses (recursivly) a
> directory and its sub directories and processes all files in the
> directory.  So at each directory if there are files in it I must build
> a list of those files and process them by exectuing a system command
> (exec?)
>
> Can some one tell me what methods to use to:
> a) Walk the directory tree
> b) execute a system command with parameters.
>   

You're in luck. Both these are easy.

os.walk iterates through the hierarchy of directories and their contents

os.system executes any command given as a string (which you can build 
however you want). Or you might use the newer "subprocess" module.

Gary Herron

> TIA.
>
>   

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to