Re: Installing cygwin, or, way to program recursive directory traversel?

  • From: "Arthur Pirika" <arfy32@xxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Thu, 29 Jul 2010 20:58:59 +1200

excellent, that's exactly what I needed. sometimes, it can be a little hard to 
find exactly where a modules documented in python's standard library. For 
example, I was looking for dir walking under file and directory manipulation, 
naturally enough. who, then,would think to look in the os module? Although, I 
see that this is a new extention. Also, had a similar problem come up when i 
wanted to look up how sys.argv worked. In this case, yay for the chm format and 
it's ability to search through the index.

Thanks.
Arthur.


  ----- Original Message ----- 
  From: Kerneels Roos 
  To: programmingblind@xxxxxxxxxxxxx 
  Sent: Thursday, July 29, 2010 7:40 PM
  Subject: Re: Installing cygwin, or, way to program recursive directory 
traversel?


  Have a look at the Python modules:
  os
  sys
  sys.path

  There are routines for recursively traversing directory structures. Could 
probably also do it with batch files, but I'd recommend going the Python route 
on Windows.

  I had some code which did exactly that, but can't find it now... Usual story, 
when you need it you can't find it!


  On Thu, Jul 29, 2010 at 8:50 AM, Arthur Pirika <arfy32@xxxxxxxxx> wrote:

    Hi, here's my problem that I'd like to solve.

    I have a directory, full of zipped, mod files. The problem is, that they're 
in a directory tree like this.
    1994, 1994/a, 1994/b, 1994/c, etc. I want to be able to have a directory 
walk through the zip files, unzipping and overwriting existing files as I go 
along. My firsst thought was to use the unix find command, something like.
    find . -name "*.zip" -execdir unzip -o {} -delete. This would, in theory, 
unzip each file found at it's current location, then delete the zip file on 
success. Thus, i decide, let's install cygwin. however, I get stuck as soon as 
i go to select packages, in that, I can't see any way of scrolling the list of 
packages. Nothing. not even trying different screen readers helped, and, I 
haven't got a mouse with a wheel handy, else I could have scrolled just fine. 
So, any work arounds, or, alternatively, hints as to how to program this 
traversal in any of python, perl, even autoit?

    ps. I do have a linux vm, and have a share with the directory mounted, but 
I'm a bit weary of using a (virtual) linux system to modify files on the real 
system. would this work?

    thanks,
    Arthur.

    __________
    View the list's information and change your settings at 
//www.freelists.org/list/programmingblind





  -- 
  Kerneels Roos
  Cell/SMS: +27 (0)82 309 1998
  Skype: cornelis.roos

  The early bird may get the worm, but the second mouse gets the cheese!


Other related posts: