Re: path stuff

2007-05-12 Thread BartlebyScrivener
On May 9, 1:11 pm, fscked <[EMAIL PROTECTED]> wrote: > I am walking some directories looking for a certain filename pattern. > This part works fine, but what if I want to exclude results from a > certain directory being printed? You might find this thread helpful http://tinyurl.com/2guk3l Note h

Re: path stuff

2007-05-11 Thread Gabriel Genellina
En Fri, 11 May 2007 13:25:55 -0300, fscked <[EMAIL PROTECTED]> escribió: >> import os, sys, os.path, fnmatch >> >> def findinterestingfiles(root_dir): >>for dirpath, dirnames, filenames in os.walk(root_dir): >> if "Archived" in dirnames: >>dirnames.remove("Archived") >> for

Re: path stuff

2007-05-11 Thread fscked
On May 10, 6:08 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Thu, 10 May 2007 19:04:30 -0300, fscked <[EMAIL PROTECTED]> > escribió: > > > > > > > ok, I lied, it is still doing the archived folders. Here is the code: > > > import os, sys > > from path import path > > > myfile = open("b

Re: path stuff

2007-05-10 Thread Gabriel Genellina
En Thu, 10 May 2007 19:04:30 -0300, fscked <[EMAIL PROTECTED]> escribió: > ok, I lied, it is still doing the archived folders. Here is the code: > > import os, sys > from path import path > > myfile = open("boxids.txt", "r", 0) > for line in myfile: > d = 'D:\\Dir\\' + path(line.strip()) >

Re: path stuff

2007-05-10 Thread fscked
On May 10, 1:43 pm, fscked <[EMAIL PROTECTED]> wrote: > On May 10, 12:45 pm, fscked <[EMAIL PROTECTED]> wrote: > > > > > > > On May 10, 10:41 am, fscked <[EMAIL PROTECTED]> wrote: > > > > On May 9, 7:02 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > > > > En Wed, 09 May 2007 15:11:06 -0300,

Re: path stuff

2007-05-10 Thread fscked
On May 10, 12:45 pm, fscked <[EMAIL PROTECTED]> wrote: > On May 10, 10:41 am, fscked <[EMAIL PROTECTED]> wrote: > > > > > > > On May 9, 7:02 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > > > En Wed, 09 May 2007 15:11:06 -0300, fscked <[EMAIL PROTECTED]> > > > escribió: > > > > > I am wal

Re: path stuff

2007-05-10 Thread fscked
On May 10, 10:41 am, fscked <[EMAIL PROTECTED]> wrote: > On May 9, 7:02 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > > > > > > En Wed, 09 May 2007 15:11:06 -0300, fscked <[EMAIL PROTECTED]> > > escribió: > > > > I am walking some directories looking for a certain filename pattern. > > >

Re: path stuff

2007-05-10 Thread fscked
On May 9, 7:02 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Wed, 09 May 2007 15:11:06 -0300, fscked <[EMAIL PROTECTED]> > escribió: > > > I am walking some directories looking for a certain filename pattern. > > This part works fine, but what if I want to exclude results from a > > cer

Re: path stuff

2007-05-09 Thread Gabriel Genellina
En Wed, 09 May 2007 15:11:06 -0300, fscked <[EMAIL PROTECTED]> escribió: > I am walking some directories looking for a certain filename pattern. > This part works fine, but what if I want to exclude results from a > certain directory being printed? Using os.walk you can skip undesired directori

Re: path stuff

2007-05-09 Thread kyosohma
On May 9, 1:11 pm, fscked <[EMAIL PROTECTED]> wrote: > I am walking some directories looking for a certain filename pattern. > This part works fine, but what if I want to exclude results from a > certain directory being printed? > > eg > > d:\dir\mydir1\filename.txt <--

path stuff

2007-05-09 Thread fscked
I am walking some directories looking for a certain filename pattern. This part works fine, but what if I want to exclude results from a certain directory being printed? eg d:\dir\mydir1\filename.txt <--I want to see this one d:\dir\mydir2\archived\filename.txt