>Hey,
>    Why don't you rely more on the operating system.  That is
>nothing more than a response from a dir call.  So it looks like
>your doing:
>
>    @lines = qx(dir *.*);
>
>    When you should really be doing:
>
>    @lines = qx(dir /b *.*);
>
>    Or for full directory tree;
>
>    @lines = qx(dir /b /s *.*);
>
>    - Justin Rogers, CEO DigiTec Web Consultants
>    [COOP]DigiTec - Half-Life, Q3A, Unreal Tournament


Hey Justin and anyone else interested,

It's actually the output of 'ls -FRl' from the Unix tools for WinNT, but you are
correct it's just a glorified directory listing.  The point of the script is to
audit files on one machine against a list generated on another (master) machine.
We distribute to over 45,000 PC's and have needed a way to validate that all
files in a release get there, and have all the proper attributes(our support
people tend to FTP many things we don't know about!).  The lines eventually
generated:

--a--    244496 Mon Feb 08 20:04:54 1999 D:\Program Files\CMAK\cmak.exe 60ee8556
--a--    447254 Wed Dec 16 17:43:18 1998 D:\Program Files\CMAK\cmak_ops.chm
0c86ece5
--a--     11314 Wed Dec 16 17:43:18 1998 D:\Program Files\CMAK\cmakeula.txt
974990e4

...contain all the info we need to verify them on the target machine.  The first
field is an attribute string (with each position for a different attribute -
drash - directory, read only, archive, system, hidden and a '-' if that attrib
is not set)  The second field is byte size, next few fields are the date info,
then finally file name, and a CRC.

We use an executable to generate the CRC and my original problem was getting the
file name out of the rough ls-FRl output to be fed into the CRC generator
executable, that script cleans up the original ls-FRl file (pulls out a few
lines that contain no file info, etc.) and tacks the CRC onto the end of each
line to get the output seen above.  THAT file is our Master manifest, and is
delivered to the target workstations where the process starts over,
(ls-FRl->crcgen) then the targets manifest file is compared against the master
and exception files are generated based on errors, those files then get run
through a formatting script I just finished, and converted to HTML so we can see
the exceptions on every workstation in our chain through a browser.  We've
already seen large differences on machines that were supposed to be identical!
It's a great set of tools for version control, and release validation.  It's all
working good now, thanks to all who offered advice!

Chuck




---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to