Re: Great SWT Program
- From: twerpinator@xxxxxxxxx
- Date: Sun, 18 Nov 2007 18:55:43 -0800 (PST)
On Nov 15, 5:46 pm, Owen Jacobson <angrybald...@xxxxxxxxx> wrote:
IF the paths to all those files don't collectively exceed the command
line length limit for the shell, whatever THAT is.
Windows' default command line buffer is explained in detail here:
<http://blogs.msdn.com/oldnewthing/archive/2003/12/10/56028.aspx>
For the purposes of a batch file, it's effectively 8196 bytes.
So much for launching 80 files simultaneously if they're in a deeply
nested directory structure. Those could easily exceed the 110 or so
characters per path name that would suffice for a list of all 80 to be
more than 8K long.
[snip description of crufty workarounds]
(I've had occasion to mass-select 80-odd text files and double click
one of them, producing 80 shiny new Notepad windows, and check for a
particular thing in each one before closing it.
$ grep -v 'some particular thing' *.txt
If the "some particular thing" isn't as simple as a specific string
appearing in each file, this won't be applicable. Certainly if nuanced
human interpretation of written English is required, automating it is
AI-complete.
Also, grep will output a list of filenames, which you then have to
type one by one as the arguments to some other commands to do your
next action with the files in question. A window system lets you just
pick them out visually and click them; no tedious typing required. In
fact I can use explorer to do a within-files search for a substring,
so I could do such a thing and move, delete, etc. the matches just by
mass-selecting them in the result pane and issuing the appropriate
command. To act on the non-matches I could move the matches to a
working directory, and in the original directory select what remains
and act on those, then put the files from the working directory back.
All with a few clicks and drags, modulo anything more complicated in
the main action; perhaps this is a mass-rename, which would involve
some typing (the common prefix; the files would end up named "prefix
(n)" with various numbers in that case).
There is always more than one good way to skin a cat. :)
Especially with a GUI with its richness of interaction methods. As
noted I can use Explorer's search, or just mass-open and manually
inspect the files, particularly if what I'm looking for can't be
described as a simple search query for a computer to apply. If the
discrimination among the files is not AI-complete I can always use a
batch file to do it, but writing one and testing it and such would be
enough work I'd need to be facing hundreds if not thousands of manual
comparisons as the only alternative before I'd resort to that
approach. Usually a search and appropriate use of drag operations and
a working directory or two will suffice.
Certainly there's no getting an unclickable list of filenames
scrolling in a terminal and having to type them all out someplace else
involved here, unless I were a masochist and did everything inside a
DOS-box.
.
- Follow-Ups:
- Re: Great SWT Program
- From: Owen Jacobson
- Re: Great SWT Program
- From: Andreas Leitgeb
- Re: Great SWT Program
- From: Andreas Leitgeb
- Re: Great SWT Program
- From: Bent C Dalager
- Re: Great SWT Program
- References:
- Re: Great SWT Program
- From: Wildemar Wildenburger
- Re: Great SWT Program
- From: nebulous99
- Re: Great SWT Program
- From: Tristram Rolph
- Re: Great SWT Program
- From: blmblm
- Re: Great SWT Program
- From: twerpinator
- Re: Great SWT Program
- From: Owen Jacobson
- Re: Great SWT Program
- Prev by Date: A Beginner:Why is my program always returning true?
- Next by Date: Re: A Beginner:Why is my program always returning true?
- Previous by thread: Re: Great SWT Program
- Next by thread: Re: Great SWT Program
- Index(es):
Relevant Pages
|