 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Stefan
Joined: 30 Jul 2004 Posts: 72 Location: Deutschland (sorry for my english)
|
Posted: Mon Oct 03, 2005 7:47 pm Post subject: Req: Collect List of DLLs with version number |
|
|
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 _________________ Stefan
This post was created with the kindly help of http://dict.leo.org/ and remember: “Allways look on the bright side of Life” |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Tue Oct 04, 2005 7:39 am Post subject: |
|
|
| 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 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  |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Tue Oct 04, 2005 8:12 am Post subject: |
|
|
| Quote: | 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. |
|
| Back to top |
|
 |
Stefan
Joined: 30 Jul 2004 Posts: 72 Location: Deutschland (sorry for my english)
|
Posted: Tue Oct 04, 2005 4:03 pm Post subject: |
|
|
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. _________________ Stefan
This post was created with the kindly help of http://dict.leo.org/ and remember: “Allways look on the bright side of Life” |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|