FileInfo plugin for Take Command / TCC / TCC/LE
Version 1.0.16 2025-09-23
Charles Dye
Purpose:
This plugin implements a single command, FILEINFO.
I have just copied the one command from my
FileUtils plugin
and made it available as a standalone plugin.
Installation:
To use this plugin, copy FileInfo.dll to
some known location on your hard drive. (If you are still using the 32-bit
version of Take Command, take FileInfo-x86.dll
instead of FileInfo.dll.) Load the .DLL file
with a PLUGIN /L command, for example:
plugin /l c:\bin\tcmd\test\fileinfo.dll
If you copy this file to a subdirectory named PlugIns within your Take Command program directory, FileInfo will be loaded automatically when TCC starts.
Plugin Features:
| New Command: | ||||
|---|---|---|---|---|
FILEINFO | ||||
Syntax Note:
The syntax definitions in the following text use these conventions for clarity:
BOLD CODE | indicates text which must be typed exactly as shown. |
CODE | indicates optional text, which may be typed as shown or omitted. |
| Bold italic | names a required argument; a value must be supplied. |
| Regular italic | names an optional argument. |
| ellipsis… | after an argument means that more than one may be given. |
Examples are shown in a gray box:
rem This is an example:
fileinfo *.txt;*.cpp
Some command options take an argument. These are shown with a colon between the
option and its argument: /A:arg
If you like, you may substitute an equals sign for the colon: /A=arg
This is handy if the arg is a filename, and you want to use tab completion to
enter the filename.
Or you can omit the colon: /Aarg
New Command:
FILEINFO — Display information
about files.
Syntax:
FILEINFO /A:attribs /C:hash /D /N:flags /O:flags /P /S /T:flags /[range] file…
/A:attribs | filter by attributes |
/C:hash | checksum and hash algorithms; see below |
/D | disable highlight |
/N:flags | disable features; see below |
/O:flags | omit features; see below |
/P | page output |
/S | look in subdirectories for matching files |
/T:mode | time display mode; see below |
/[range] | many range options are supported |
| file | wildcards, directory aliases, include lists, and @file lists are supported |
FILEINFO displays information about files; go figure. By
default, the information shown includes the full, canonical filename; any
version information; any TCC file description; the file size, date and time
stamps, and attributes; CRC32 and MD5 checksums; 4DOS file descriptions;
executable types; Windows properties; and document summary information.
/N: disables features. These flags
can be combined:
C | disable highlight |
D | do not search into hidden directories |
F | suppress file-not-found errors |
J | do not search into junctions |
Z | do not search into system directories |
/O: omits classes of information.
These flags can be combined:
A | omit attributes |
C | omit checksums |
D | omit file descriptions |
E | omit text file encoding |
F | omit TTF font info |
H | omit file version header |
I | omit image file info |
L | omit link targets |
N | omit NTFS streams info |
P | omit Windows properties |
Q | do not use fancy Unicode quotes |
R | omit file type information |
S | omit document summary information |
T | omit time stamps |
U | do not resolve AppX execution aliases or symlinks to .exe files |
V | omit version information |
X | omit executable information |
Z | omit sizes |
Omitting information can make the command faster and reduce the amount
of text that is displayed. In particular, computing checksums for very large
files can be slow; using /OC will save this time.
/C: specifies the type of checksum
or hash displayed by FILEINFO. The available algorithms are:
CRC32 | CKSUM | MD5 |
SHA1 | SHA256 | SHA384 |
SHA512 |
You can give more than one, separated by commas. If no /C:
is given, the default is /C:CRC32,MD5.
/T: selects which time stamps to
display, and how to show them. Flags may
include:
A | show the last-access time stamp |
C | show the creation time stamp |
M | show the last-modified time stamp |
D | default: localize time stamps as TCC and CMD.EXE do |
L | local times, taking DST time changes into account |
U | Coordinated Universal Time |
F | show fractional seconds; the default is not to show them |
A, C, and M may be combined. If
none is given, the default is to display all three time stamps. Only one
of D, L, and U should be given; the
default is D.
fileinfo "%_cmdspec"
Reference Information:
Paging Options:
FILEINFO has a /P option to page
output. This option supports two suboptions:
/P:time,lines
| time | time in seconds, or (with a trailing M) milliseconds |
| lines | number of lines to display before pausing |
Both time and lines are optional. The colon is not required, but you must use the comma if you want to specify lines.
rem Scroll every five seconds:
fileinfo /p:5
rem Display ten lines at a time:
fileinfo /p:,10
rem Display twenty lines at a time, and
rem scroll every 2.5 seconds:
fileinfo /p:2500m,20
At the “Press a key to continue” prompt, most keys will advance by another screenful (or lines). But a few keys behave differently:
| A or C | turns off paging, and scrolls continuously |
| Esc or Ctrl-C | aborts the current command |
| / | scrolls half a screen, or half of lines |
| 1 to 9 | scrolls that many lines, e.g. 3 scrolls three lines |
Ranges:
This plugin supports the following range syntax:
Size range: /[Ssmallest,largest]
You may omit either smallest or
largest. You may qualify either with a trailing
letter: lowercase k, m, g, etc.
to multiply by one thousand, one million, one billion, and so on; or
uppercase K, M, G, etc. to
multiply by 210, 220, 230, and so on. If
largest begins with a + sign, it is
an increment over smallest. Use
/![Ssmallest,largest]
to invert the test and return only files not in the given size range.
Date range: /[D[acw]:earliest,latest]
You may omit either earliest or latest; either defaults to the current date. The optional [acw] argument selects the date stamp to check. (If you want to check more than one date stamp, you must supply more than one date range option.) The colon after the [acw] is optional.
Dates may be given in the local date format, or in
yyyy-mm-dd
format (with a four-digit year). You may also specify a date as an offset
preceded with a + or - sign; the offset is in days
relative to today’s date (for earliest) or
relative to earliest (in the case of
latest). If earliest
turns out to be later than latest then the two
are exchanged.
You may also give a specific time on either date, preceded
by an @ sign. The time may be in either 24-hour format, or 12-hour
format with a trailing A or P.
Use /![D[acw]:earliest,latest]
to invert the test and return only files not in the given date range.
Time range: /[T[acw]:earliest,latest]
You may omit either earliest or
latest.
The optional [acw]
argument selects the time stamp to check. (If you want to check more than one
time stamp, you must supply more than one time range option.) The colon after
the [acw]
is optional. Times may be in either 24-hour format, or 12-hour format with a
trailing A or P.
Use /![T[acw]:earliest,latest]
to invert the test and return only files not in the given time range.
Exclusion range: /[!wildspec]
Filenames matching the wildspec will be excluded. You can supply more than one wildspec by separating them with (unquoted) spaces.
Owner range: /[Owildspec]
Files whose owners (in domain\user
format) do not match the wildspec will be
skipped. Use /![Owildspec]
to invert the test and return only files which do not match the owner
wildspec.
Description range: /Iwildspec or (alternate syntax) /[Iwildspec]
If a file’s description does not match the wildspec,
it will be skipped. Use /!Iwildspec
to invert the test, returning only files which do not match the description
wildspec.
Day-of-the-week range: /[W[acw]:days]
You may specify multiple days separated by commas, e.g.
/[W:MON,WED,FRI]. You can also give a range, for example
/[W:TUE-FRI]. WEEKENDS is accepted as a synonym for
SAT,SUN; WEEKDAYS is a synonym for MON-FRI.
The colon in this syntax is required.
You may supply multiple ranges. A file must match all given ranges or it will be skipped.
Highlight Variable:
FILEINFO features highlighted output. You can
customize this feature by setting an environment variable Highlight:
rem Disable highlight:
set highlight=none
rem Set the highlight foreground:
set highlight=bright cyan
rem Set both foreground and background:
set highlight=bri whi on blu
rem Numbers are also supported:
set highlight=46
If the Highlight environment variable is not defined, the plugin will
check the registry for a value named Highlight of type REG_SZ.
The plugin will search, in this order:
• HKEY_CURRENT_USER\Software\JPPlugins\FileUtils | (affects this plugin only) |
• HKEY_CURRENT_USER\Software\JPPlugins | (affects several of my plugins) |
FILEINFO also has a /D option to disable highlighting.
Startup Message:
This plugin displays an informational line when it initializes. The
message will be suppressed in transient or pipe shells. You can disable it
for all shells by defining an environment variable named NOLOADMSG,
for example:
set /e /u noloadmsg=1
Changes:
| Version: | Date: | Changes: |
|---|---|---|
| 1.0.16.5 | 2025-09-23 | Now accepts /T:W as a synonym for
/T:M, for compatibility with DIR. |
| 1.0.16.4 | 2025-09-18 | Updated versions of conlist.cpp, FileHandler.cpp, and MMFiles.cpp. |
| 1.0.16.3 | 2025-08-08 | Another VLFN tweak: Use FH_AppendFilename() not AppendFilename(). |
| 1.0.16.2 | 2025-08-05 | DisplayFileVerHeader() can also pick up TTF font file info. |
| 1.0.16.1 | 2025-08-04 | DisplayFileAttributes() also attempts to display
the name of the file’s owner. Preliminary support for very long filenames (VLFNs). |
| 1.0.16.0 | 2025-08-01 | Now shows TTF font info; /OF to disable. |
| 1.0.15.0 | 2025-06-26 | Now shows NTFS streams info; /ON to disable. |
| 1.0.14.5 | 2025-04-24 | Added a check for a NO_COLOR environment
variable. If NO_COLOR is defined and Highlight is not, highlighting is disabled,
the same as if /D had been specified. |
| 1.0.14.4 | 2025-04-22 | DisplayLnkTarget() also shows executable info for .scr and .dll files. |
| 1.0.14.3 | 2025-04-17 | DisplayLnkTarget() also shows the FileDescription string if available. If there is a FileVersion string, that is shown in preference to the binary file version. |
| 1.0.14.2 | 2025-04-16 | DisplayLnkTarget() also attempts to display EXE type info for the target executable. |
| 1.0.14.1 | 2025-04-09 | DisplayLnkTarget() also attempts to display version info for the target executable, if any. |
| 1.0.14.0 | 2025-04-04 | Added /TF show show fractional seconds
(milliseconds). |
| 1.0.13.2 | 2025-03-29 | Removed the extra blank line introduced by the last update. |
| 1.0.13.1 | 2025-03-29 | When displaying the target of a .lnk file,
if the target is an .exe file with a size of zero, check for an AppX alias and show that too if found. Added quotes around AppX alias targets. |
| 1.0.13.0 | 2025-03-27 | Added some more text file types: .bat .btm .cmd
.css .csv .h .htm .ini .xml. Minor code tweaks. |
| 1.0.12.0 | 2025-03-25 | For text file types, also display the line count and EOL type. |
| 1.0.11.6 | 2025-01-06 | If the file’s Open command is just “%1”, don’t bother to display it. |
| 1.0.11.5 | 2024-12-28 | Now displays file type info; /OR to disable. |
| 1.0.11.4 | 2024-12-05 | DisplayAppXTarget() also chases symlinks as well as AppX aliases
(unintended feature). So roll with it! When following a symlink to an executable, prefix the symlink target with “Symlink:”
instead of “AppX alias:”. |
| 1.0.11.3 | 2024-12-03 | The numeric file version is now displayed as “Version (binary)” to distinguish it from the version info strings. |
| 1.0.11.0 | 2024-10-03 | Use fancy Unicode quotes around the file description string and
link target; /OQ to revert to plain old ASCII quotes. |
| 1.0.10.4 | 2024-10-01 | ParseInt() now supports octal numbers with a leading 0o.
Changed http:// to https:// in the PLUGININFO block. |
| 1.0.10.3 | 2024-09-09 | Do not report “access denied” errors on FindFirstFile(). |
| 1.0.10.2 | 2024-07-26 | When resolving AppX aliases, check that the target file’s size is greater than zero. |
| 1.0.10.1 | 2024-07-23 | Workaround for GetBinaryType() sometimes returning ERROR_ACCESS_DENIED for Windows Store apps. |
| 1.0.10.0 | 2024-07-19 | Added the ability to resolve AppX
execution aliases; use /O:U to disable. |
| 1.0.9.3 | 2024-02-07 | Reworked and simplified the code that displays file hashes. |
| 1.0.9.2 | 2024-02-05 | Added /C: to select which checksums/hashes to compute and display. |
| 1.0.9.1 | 2024-01-31 | Added /T:ACM to select which time stamps to display. |
| 1.0.9.0 | 2024-01-29 | Adds text file encoding, .LNK file targets. Enabled @file lists. |
| 1.0.8.2 | 2024-01-17 | DLL files may have any subsystem value, so long as it isn’t zero. |
| 1.0.8.1 | 2024-01-10 | Added /N? to show help text for /N suboptions. |
| 1.0.8.0 | 2024-01-03 | Changes for conlist v1.1, to better support Ctrl-C and Ctrl-Break. Check for display strings containing only whitespace, and don’t display them. (Why would anyone do this?) |
| 1.0.7.2 | 2023-12-17 | If the EXIF date stamp looks valid, display it in the same format as other date stamps in this command, including day of the week. |
| 1.0.7.1 | 2023-12-16 | Removed the #include "ImgInfo.cpp" Fixed FileInfoCmd.cpp so it can be successfully
compiled either with or without ImgInfo.cpp. |
| 1.0.7.0 | 2023-12-15 | Added /T: to set the time stamp display mode. Added ability to show time stamps
as UTC. Fixed a possible memory leak with /O? |
| 1.0.6.1 | 2023-12-15 | DisplayFileTimeStamps() and DisplayFileAttributes() : If the usual methods of getting info fail, try reading from the directory instead. |
| 1.0.6.0 | 2023-12-14 | Explicitly #include "ImgInfo.cpp". Summary item names get a field length of 24, the same as version info, image file info, and Windows property names. Added "32-bit DLL file" and "64-bit DLL file" executable type strings. Added a bit more sanity checking to FI_ParseExeHeader(). |
| 1.0.5.2 | 2023-12-14 | Fix for DisplaySummaryInfo() not correctly returning USER_ABORT when the user did in fact abort. Renamed this file to FileInfoCmd.cpp. |
| 1.0.5.1 | 2023-10-10 | Tweaked the help text to mention the existence of /O? |
| 1.0.5.0 | 2023-09-21 | Added executable type info, and /O:X to disable it. Added /O? to show help text
for /O suboptions. |
| 1.0.4.2 | 2023-08-28 | Defined filename args as constant types. |
| 1.0.4.1 | 2023-08-01 | Fixed a possible memory leak on user abort. |
| 1.0.4.0 | 2022-03-17 | Added support for System.Music.TrackNumber. |
| 1.0.3.2 | 2022-03-10 | Renamed the “not available” string. |
| 1.0.3.1 | 2022-03-04 | Now I’m calling them “Windows properties” instead of “shell properties”. No changes to functionality. |
| 1.0.3.0 | 2022-03-03 | Added support for some shell properties; /O:P to disable. |
| 1.0.2.0 | 2022-03-02 | Added image file info; /O:I to disable. |
| 1.0.1.0 | 2022-03-01 | Rewritten to use newer versions of FileHandler.cpp and conlist.cpp.
Added /D and /NC to disable highlight. Help text is now displayed via ShowCmdHelp(). |
| 1.0.0.0 | 2021-09-14 |
Status and Licensing:
This plugin is © Copyright 2025, Charles Dye. Unaltered copies of the binary and documentation files may be freely distributed without restriction. I make no guarantee and give no warranty for its operation. If you find a problem, you can report it in the JP Software support forum.
Download:
You can download the current version of this plugin from https://charlesdye.net/dl/fileinfo.zip.