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

  • From: "DaShiell, Jude T. CIV NAVAIR 1490, 1, 26" <jude.dashiell@xxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Thu, 29 Jul 2010 07:45:15 -0400

The unzip utility given the right options can do this for you without
the need to program if corresponding directory structures exist in the
zip file or files and on the hard drive.  If not, you have a problem
unzip by itself cannot handle.  By default, unzip recourses down
directory trees so you get recursion for free with no option needed.
You would want to use an overwrite option with unzip too.  That will be
found in the long documentation.  You can read up on all of this by
giving google a search like man unzip and the unix man page will be
shown.  No sense in reinventing the wheel.


-----Original Message-----
From: programmingblind-bounce@xxxxxxxxxxxxx
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Arthur
Pirika
Sent: Thursday, July 29, 2010 2:51
To: programmingblind@xxxxxxxxxxxxx
Subject: Installing cygwin, or, way to program recursive directory
traversel?

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

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

Other related posts: