- Aug
- 2,308
- 111
In the Tasks plugin,
the Tasklist command can display extra information about each process,
using the /E switch.
That is,
32-bit programs are marked with a guillemet: » when using the Tasklist command.
Could the DIR command be modified to do the same thing?
That is, add a switch that would display 32-bit programs (.exe) and 32-bit Dynamic Link Libraries (.dll) by marking them with a guillemet: »
Or maybe not a guillemet: »,
as I also want the DIR command to display if the .exe is a Console or GUI executable.
I realize that there is already an /E switch for the DIR command,
so another switch would be necessary.
I am aware that I can do this using the PDIR command,
but incorporating this into the DIR command would be useful.
I am aware that I can use the COLORDIR environment variable,
to indicate if an .exe is a 32-bit Console or 32-bit GUI executable,
but when I do a DIR | VIEW
or a DIR | LIST I don't see the colors.
I'm currently using the following code to determine if an .exe is a Win32 GUI executable,
or a Win32 console executable.
Ref: https://charlesdye.net/dl/tasks.zip
Ref: https://jpsoft.com/help/f_exetype.htm
Ref: https://jpsoft.com/help/dir.htm
Joe
the Tasklist command can display extra information about each process,
using the /E switch.
That is,
32-bit programs are marked with a guillemet: » when using the Tasklist command.
Could the DIR command be modified to do the same thing?
That is, add a switch that would display 32-bit programs (.exe) and 32-bit Dynamic Link Libraries (.dll) by marking them with a guillemet: »
Or maybe not a guillemet: »,
as I also want the DIR command to display if the .exe is a Console or GUI executable.
I realize that there is already an /E switch for the DIR command,
so another switch would be necessary.
I am aware that I can do this using the PDIR command,
but incorporating this into the DIR command would be useful.
I am aware that I can use the COLORDIR environment variable,
to indicate if an .exe is a 32-bit Console or 32-bit GUI executable,
but when I do a DIR | VIEW
or a DIR | LIST I don't see the colors.
I'm currently using the following code to determine if an .exe is a Win32 GUI executable,
or a Win32 console executable.
Code:
dir /b *.exe > tmp9:
tmp /c tmp8:
do theFile in @tmp9:
switch %@exetype[%theFile]
case 6
if %1 eq gui echo %theFile Win32 GUI >> tmp8:
case 7
if %1 eq con echo %theFile Win32 console >> tmp8:
default
echo ` ` >> tmp8:
endswitch
enddo
:: ffields is a plugin command (TextUtils)
type tmp8: |! ffields
Ref: https://charlesdye.net/dl/tasks.zip
Ref: https://jpsoft.com/help/f_exetype.htm
Ref: https://jpsoft.com/help/dir.htm
Joe