W3C home > Mailing lists > Public > html-tidy@w3.org > January to March 2000

Re: wildcards with html-tidy/DOS

From: Todd M. Lewis <utoddl@email.unc.edu>
Date: Mon, 24 Jan 2000 14:45:52 -0500
Message-ID: <388CABF0.6B6DBAFF@email.unc.edu>
To: Ari Davidow <ari@ivritype.com>
CC: html-tidy@w3.org
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
to get it to work. Specifically, note that the following DOESN'T

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

because the redirect is evaluated once for the entire "for..."
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
to mind):

* Get the solaris stuff working. :-)
* Get bash/perl/sed/etc. for NT.
* Install a small Linux on the NT box and use
  (but this requires turning your NT box into a dual boot machine
   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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:47 UTC