Re: Changing a value for each folder while traversing a file system

2006-07-28 Thread PipedreamerGrey
Perfect. That's exactly what I wanted. Thanks. For those reading this later on, the following script will crawl through a directory, select all the text files, dump them into seperate numbered html files in the parent directory (in which the python script is executed). In this example, the firs

Re: Changing a value for each folder while traversing a file system

2006-07-27 Thread Peter Otten
PipedreamerGrey wrote: > That seems logical, but the syntax doesn't work. I keep getting the > error: > 'module object' has no attribute 'dirname' os.dirname() was a typo, try os.path.dirname(). Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Changing a value for each folder while traversing a file system

2006-07-27 Thread PipedreamerGrey
That seems logical, but the syntax doesn't work. I keep getting the error: 'module object' has no attribute 'dirname' -- http://mail.python.org/mailman/listinfo/python-list

Re: Changing a value for each folder while traversing a file system

2006-07-27 Thread Peter Otten
PipedreamerGrey wrote: > I'm using the script below (originally from http://effbot.org, given to > me here) to open all of the text files in a directory and its > subdirectories and combine them into one Rich text > file (index.rtf). Now I'm adapting the script to convert all the text > files int

Re: Changing a value for each folder while traversing a file system

2006-07-27 Thread PipedreamerGrey
No, that doesn't work. Though, leaving the random snippet about the "for file in DirectoryWalker("."):" line, it does leave all files the same value, rather than switching the value for every single file. The problem is, the value is shared accross every folder. -- http://mail.python.org/mailma

Re: Changing a value for each folder while traversing a file system

2006-07-26 Thread Simon Forman
PipedreamerGrey wrote: > I'm using the script below (originally from http://effbot.org, given to > me here) to open all of the text files in a directory and its > subdirectories and combine them into one Rich text > file (index.rtf). Now I'm adapting the script to convert all the text > files into

Changing a value for each folder while traversing a file system

2006-07-26 Thread PipedreamerGrey
I'm using the script below (originally from http://effbot.org, given to me here) to open all of the text files in a directory and its subdirectories and combine them into one Rich text file (index.rtf). Now I'm adapting the script to convert all the text files into individual html files. What I c