Re: wildcards with html-tidy/DOS

Ari Davidow wrote:
> 
> What I =want= to do, is to process the files such that they are written to a new directory, something like
> 
> html-tidy in/*.txt >out/*.txt
> 
> This is not working. I can redirect single files
>    html-tidy in/foo.txt >out/foo.txt
> 
> but not wildcards.

Try something like this:

  copy in\*.txt out
  cd out
  for %%f in ( *.txt ) do html-tity -m %%f

It's been a long time since I did DOS; you may have to tweak the
above
to get it to work. Specifically, note that the following DOESN'T
work:

  cd in
  for %%f in ( *.txt ) do html-tidy %%f >..\out\%%f

because the redirect is evaluated once for the entire "for..."
command,
not once for each file.
 
> Beyond that, as may be evinced from the non-html file ending, what I'm
> =really= trying to do with this group of files is to process some text
> files that contain html, but which are not, in and of themselves html.
> In an ideal world, this would mean that I'd have a way to suppress the
> html header and footer, but I can find no way to do so. Is there anything
> to be done?

In rough order of preference (which incidentally is the order they
came
to mind):

* Get the solaris stuff working. :-)
* Get bash/perl/sed/etc. for NT.
* Install a small Linux on the NT box and use
tidy/bash/perl/sed/etc.
  (but this requires turning your NT box into a dual boot machine
and
   the down time my be unacceptable.)
* Write something in Visual Basic to filter the files as needed.

Good Luck,

> ari
> 
> Ari Davidow
> ari@ivritype.com
> http://www.ivritype.com/

-- 
   +------------------------------------------------------------+
  / Todd_Lewis@unc.edu              http://www.unc.edu/~utoddl /
 /(919) 962-5273           "Year 00 compliant for -98 years!" /
+------------------------------------------------------------+

Received on Monday, 24 January 2000 14:45:55 UTC