flat assembler
Message board for the users of flat assembler.
Index
> Windows > scanexe -Analyze types of EXE files in a directory in one go |
| Author |
|
|
Mаt Quasar 09 Dec 2025, 07:51
Derived from pebasic.asm, this scanexe.asm is exclusively designed for batch processing of all EXE files in the same directory - it analyzes every EXE file for bitness and image subsystem, as shown in screenshot or below:
Quote:
Basically you put scanexe.exe in a fixed directory (preferably included in PATH environment variable), then go to the directory you want to scan for all EXEs (maximum 8192 files), and just type scanexe.exe. Not thoroughly tested, bug report is welcome. -------------- With a batch script (generated by AI tool), you can loop through every EXE on C drive, such as: Code: @echo off setlocal set "root_dir=C:\" pushd "%root_dir%" for /d /r %%i in (*) do ( echo Processing directory: "%%i" cd %%i scanexe.exe pause ) popd endlocal (Provided scanexe.exe is in environment variable "PATH") You can also redirect output to text file using ">" or ">>". Extra: The following code creates a full report on every EXE on your C drive as REPORTS.TXT (You may need to run CMD.EXE as Administrator so the scanexe.exe can process system folders) Code: @echo off setlocal set "root_dir=C:\" pushd "%root_dir%" for /d /r %%i in (*) do ( echo Processing directory: "%%i" cd %%i echo %%i >> %root_dir%reports.txt scanexe.exe >> %root_dir%reports.txt ) popd endlocal -------------- After running the script above for more than 2 hours, it still hasn't finished scanning all files in my C drive. Using an advanced text editor like Notepad++, can examining the C:\REPORTS.TXT by searching for "32-bit" / "64-bit" / "Console app" / "GUI app". Below are number of occurrences: 32-bit EXE - 1032 64-bit EXE - 1457 -- Console app - 1456 GUI app - 1033 -- 32-bit Console app - 483 64-bit Console app - 973 32-bit GUI app - 549 64-bit GUI app - 484 The generated text file is too large to be attached here (5MB ++), but forget about ZIP file, no point uploading here.
Last edited by Mаt Quasar on 10 Dec 2025, 11:04; edited 7 times in total |
||||||||||||||||||||
|
||||||||||||||||||||
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.