Actually, the original poster (me) very trying to solve a different problem.
I clearly specified that what was wanted is a perl program to convert the 
output of the Windows dir command into a structured text format suitable for 
use with sort and/or loading into a database. 

This would let me see what will be impacted by a partial restore.
It also has the benefit of not needing anything installed on my wife's machine 
(which is the target of the backup) -- not rsync, not find, not even perl.

Having a "canonical" format for file information also allows comparison with 
the list produced by many other programs, e.g. ls, find, Sequoia View, Wilbur, 
any other backup program, etc.  My suggested format was:

Path|file|extension|Dir_or_File|bytes|date|time

e.g.

C:\_from_laptop\AAA BBB_files|empty.jpg|txt|Dir|0|2003-04-14|23:00

So the natural sort works as desired and it is also easy to be a timestamp 
based sort.

I continue to think about that original problem.  I realize that I should 
probably force bytes to 0 if type is Dir.
The program probably should have an option to change between slash and 
backslash, and possibly suppress the drive letter.

I might actually write this program one day; if I do I'll post it here for 
feedback.


P.S. I tried to find a version of rsync for Windows that does not require 
cygwin.  Is there one?


Hopefully helpfully yours,
Steve
-- 
Steve Tolkin    Steve . Tolkin at FMR dot COM   617-563-0516 
Fidelity Investments   82 Devonshire St. V13C    Boston MA 02109
There is nothing so practical as a good theory.  Comments are by me, 
not Fidelity Investments, its subsidiaries or affiliates.

-----Original Message-----
From: Chris Devers [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 26, 2005 2:16 PM
To: John Macdonald
Cc: boston-pm@mail.pm.org; Ricker, William; Tolkin, Steve
Subject: Re: [Boston.pm] Quotes and such [was] RE: script to "normalize" output 
of Windows dir command


On Mon, 26 Sep 2005, John Macdonald wrote:

> On Mon, Sep 26, 2005 at 12:48:08PM -0400, Ricker, William wrote:
> > Chris Devers was however obviously looking for this rather specific 
> > elaboration of Santayana's, as it captures the inevitableness.
> > 
> > [ "Any sufficiently complicated c or fortran program contains an ad hoc
> > informally-
> > [ specified, bug-ridden, slow implementation of half of Common Lisp."
> > [      -Greenspun's 10th law of programming 
> > [ http://philip.greenspun.com/bboard/q-and-a-fetch-msg?msg_id=000tgU
> > 
> > Note - there are no laws (1..9).
> 
> Actually, I think he was looking for Henry Spencer's old quote:
> "Those who do not understand Unix are doomed to reinvent it
> - badly."
 
Either of those, actually :-)

AS I say, I'm sure there's some witty nugget of a reformulation of those 
lines based around this thread and rsync -- the Unix variant is nice and 
succinct, while the Lisp one gets more specific -- but I can't be 
bothered to tease it out. 

In any case, the point stands: the original poster was looking for a way 
to solve a problem in Perl that rsync already has tackled. Perl is a 
nice tool and suitable for many purposes, but there are limits beyond 
which even the roundest of reinvented wheels can get no rounder, and 
rsync is clearly the roundest wheel for this job :-)



-- 
Chris Devers

ÝSB½ÚF5†        {Dp
 
_______________________________________________
Boston-pm mailing list
Boston-pm@mail.pm.org
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to