Newbie-ish question
Sean 'Shaleh' Perry
shalehperry at home.com
Mon Nov 19 17:00:32 EST 2001
On 19-Nov-2001 Patrick Moorman wrote:
> I have a directory containing a large number of files in the format xy.txt
> where x is a string of numbers and/or letters and y is a sequential number
> with either 2 or 3 digits. Example: 1foo23012.txt or foo12305.txt. How
> would I go about identifying all of the files in a sequence and moving them
> to their own sub-directory. I am slowly picking up on Python, but there is
> a long ways to go. Thanks for any help.
>
unless you can come up with a way to differentiate
1foo23112 -> (1foo23 112) from (1foo231 12)
this will be a hard problem. From the examples you gave I could not tell if y
was 012 or 12 in the first one and 305 or 05 in the second one.
More information about the Python-list
mailing list