[Boston.pm] script to normalize output of Windows dir command

2005-09-23 Thread Tolkin, Steve
Summary: I would like a perl script that converts the output of the Windows dir command so that each line has the same format, including the directory it is in, and its extension. The date and time should use a format that can be sorted as a string, e.g. -mm-dd and a 24 hour clock I think

Re: [Boston.pm] script to normalize output of Windows dir command

2005-09-23 Thread Jeremy Muhlich
How about the unix find command, with the -printf option? You can get it through cygwin. Taking find's output (even without -printf) from two directories and diffing it has gotten me through most of these sorts of problems. Also, diff -r might be helpful. (possibly with the --brief option as

Re: [Boston.pm] script to normalize output of Windows dir command

2005-09-23 Thread Tolkin, Steve
I do have a port of Unix find on my current Windows machine. But I do not have that on the machine I back up to (my wife's), so I would need to install that, and its dependencies, which makes me reluctant to take that approach. I, like many people, have had problems with find, but I thought I

Re: [Boston.pm] script to normalize output of Windows dir command

2005-09-23 Thread Tom Metro
Jeremy Muhlich wrote: Also, diff -r might be helpful. ... I'd strongly second that recommendation. I often use diff on Windows to verify file systems, such as burned CDs. (And prior to a diff port being available, I had a home brew script written in Perl that compared the checksum of files in

Re: [Boston.pm] script to normalize output of Windows dir command

2005-09-23 Thread Kripa Sundar
Dear Steve, Also date and time are combined into three fields, but the third is either time or year. This makes it harder to process. I would actually prefer time in seconds since the start of the Unix eon. IMHO, File::Find and stat() should solve your problems. The following is a starting