AutoHotkey Community

It is currently May 27th, 2012, 3:12 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: October 3rd, 2005, 7:47 pm 
Offline

Joined: July 30th, 2004, 11:30 pm
Posts: 74
Location: Deutschland (sorry for my english)
Hi folks,

i need a tool for scaning a directory [with sub folders]
for all DLLs, SYS and OCX (and EXEs ?)
and create a customizable output list (as TXT file)
of them with versions number, size and created date.

Than i want to compare two of this lists with an diff tool.

I found only FileVer from the free ResKit tools
but the output of this tool is not customizable.

The output should look like

something.dll     6.01.003.15      01.09.1999      C:\WinNT\System32\   EN

Can i do that with AHK ?
Or do someone know a freeware [command line] tool ?

-------------------

Also i look for an command line tool
to delete e.g. the first 4 columns and the 6th column
of an text file. Do anybody know one ?

FileVer output:
Code:
--a-- W32i   DLL DEU      5.0.2134.1 shp     67,344 07-24-2002 avicap32.dll
--a-- W32i   DLL DEU   5.0.2195.6612 shp     78,608 06-19-2003 avifil32.dll


Thanks

_________________
Image Stefan

This post was created with the kindly help of http://dict.leo.org/ and remember: “Allways look on the bright side of Life”


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 4th, 2005, 7:39 am 
Quote:
Also i look for an command line tool
to delete e.g. the first 4 columns and the 6th column
of an text file. Do anybody know one ?
AHK!

Would you mind to point out columns/field content you wanna extract?
Sample/Beispiel
Quote:
--a-- W32i DLL DEU 5.0.2134.1 shp 67,344 07-24-2002 avicap32.dll


Quote:
i need a tool for scaning a directory [with sub folders]
for all DLLs, SYS and OCX (and EXEs ?)
and create a customizable output list (as TXT file)
of them with versions number, size and created date.

Code:
ExtToFind = dll,ocx,sys,exe
StringSplit, Array, ExtToFind, `,
Loop, %Array0%
{
   Ext := Array%A_Index%
   RunWait, cmd /c dir C:\%Ext% /s /b > %Ext%.txt,,Max
   Run, notepad %Ext%.txt
}
Verbesserungpotenzial: die Laufwerksbezeichnung(en) noch mit DriveGet rauskitzeln und vervariablen :wink: BTW: Ungetestet.
Und das nächste mal die Issues auf mehrere Postings verteilen. Erhöht die Chance auf Antwort zu wenigstens einem davon. Grazie&Ciao 8)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 4th, 2005, 8:12 am 
Quote:
:shock: C:\%Ext%
Code:
C:\*.%Ext%
Additionaly based on (non)available switches of DOS's dir command the output won't match exactly what you expect. But it should be possible to create a workarround with plain AHK and/or with an *nix command (ls) available from the cygwin package.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 4th, 2005, 4:03 pm 
Offline

Joined: July 30th, 2004, 11:30 pm
Posts: 74
Location: Deutschland (sorry for my english)
Thanks BoBo,

but i wanted to have a list with the versions numbers.

I use at the moment AWK to format the output of FileVer
for an nicer overview
and than i use DIFF to show the version differences between e.g. bevor an installation and after them.

------------------
bevor.cmd
Code:
@echo off

::_vorher

if not exist    C:\Test\.    md C:\Test

bin\filever /E  %SystemRoot%                    >C:\Test\VCheck01.txt
bin\filever /E  %SystemRoot%\system32          >>C:\Test\VCheck01.txt
bin\filever /E  %SystemRoot%\system32\drivers  >>C:\Test\VCheck01.txt


VCheck01.txt
Quote:
--a-- W32i APP ENU 5.1.2600.2180 shp 100,352 08-04-2004 6to4svc.dll
--a-- W32i DLL DEU 5.1.2600.0 shp 26,624 08-04-2004 aaaamon.dll


----------------------
after.cmd
Code:
@echo off

:_nacher

bin\filever /E    %SystemRoot%\                      >C:\Test\VCheck02.txt
bin\filever /E    %SystemRoot%\system32             >>C:\Test\VCheck02.txt
bin\filever /E    %SystemRoot%\system32\drivers     >>C:\Test\VCheck02.txt

bin\awk        "/.exe|.sys|.dll|.ocx/ {print $4,$5,$7,$8,$9}"     C:\Test\VCheck01.txt    >C:\Test\VCheck11.txt

bin\awk        "/.exe|.sys|.dll|.ocx/ {print $4,$5,$7,$8,$9}"     C:\Test\VCheck02.txt    >C:\Test\VCheck22.txt


bin\diff     C:\Test\VCheck11.txt C:\Test\VCheck22.txt    >C:\Test\VCheck33.txt

notepad      C:\Test\VCheck33.txt


VCheck11.txt
Quote:
ENU 5.1.2600.2180 100,352 08-04-2004 6to4svc.dll
DEU 5.1.2600.0 26,624 08-04-2004 aaaamon.dll


At least i open the VCheck33.txt in notepad to show the output of DIFF.



Now i search for the corresponding features in AHK
to reduce the tools and build one AHK_VCheck.exe

Thanks for the support


----
Edit:
OK, "FileGetVersion," i have found, now i try to build an script around this.

_________________
Image Stefan

This post was created with the kindly help of http://dict.leo.org/ and remember: “Allways look on the bright side of Life”


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: rbrtryn and 26 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group