Creating a directory structure and modifying files automatically in Python

John Nagle nagle at animats.com
Tue May 1 01:54:04 EDT 2012


On 4/30/2012 8:19 AM, deltaquattro at gmail.com wrote:
> Hi,
>
> I would like to automate the following task under Linux. I need to create a set of directories such as
>
> 075
> 095
> 100
> 125
>
> The directory names may be read from a text file foobar, which also contains a number corresponding to each dir, like this:
>
> 075 1.818
> 095 2.181
> 100 2.579
> 125 3.019
>
>
> In each directory I must copy a text file input.in. This file contains  two lines which need to be edited:

    Learn how to use a database.  Creating and managing a
big collection of directories to handle small data items is the
wrong approach to data storage.
				
				John Nagle



More information about the Python-list mailing list