PopInfo plugin for Take Command / TCC / TCC/LE
Version 1.1.0 2014-10-29
Charles Dye
Purpose:
This plugin provides a quick way to check a file’s properties while composing a command line. When you press a hotkey, a popup message box will display the file’s size, attributes, date and time stamps, and a few other bits of information.
Installation:
To use this plugin, copy PopInfo.dll to
some known location on your hard drive. (If you are using the 64-bit
version of Take Command, take PopInfo-x64.dll
instead.) Load the plugin with a PLUGIN /L
command. For
example:
plugin /l c:\bin\tcmd\test\popinfo.dll
If you copy the .DLL file to a subdirectory named PlugIns within your Take Command program directory, the plugin will be loaded automatically by each new instance of TCC.
• Note: This plugin requires Take Command, TCC, or TCC/LE version 11.00.48 or later. It will not work with older versions.
Using PopInfo:
Type a filename, or move the cursor to a filename; then press the hotkey (the default is Control-Q.) PopInfo will scan the command line and attempt to find a filename at the cursor position. If a filename is found, then a popup message box will display directory information about the file. Press Esc or the space bar to dismiss the message box, and you will return to editing the command line in progress.
PopInfo will beep if any error occurs. Errors include being unable to locate a filename at the cursor, and a file which does not exist. If the filename at the cursor contains wildcards, you’ll hear a double beep. Internet files (http://, ftp://, and so on) are not supported.
PopInfo command:
This new command allows you to display or change options for the PopInfo plugin. The syntax is:
POPINFO
/S /R /L /T:
x /C:
x
hotkey
/S | Saves the current settings to the registry. They will be the new defaults when the PopInfo plugin is loaded in the future. |
/R | Restores the previously saved options from the registry. |
/L | Dumps a list of all the supported hotkeys to standard output. |
/T: x | Turns smart timestamps on or off. x is 0 for OFF, 1 for ON (the default), or 2 to show UTC times. |
/C: x | Turns subdirectory counting on or off. x is 0 for OFF or 1 for ON (the default.) |
Some examples of valid hotkeys are Control-Q, Alt-I, F2, or Shift-F10. Control-Q is the default. If no hotkey is specified, the current setting will be displayed.
• Note: Many of the hotkeys which you can set are already used by Take Command, TCC, or the Windows console manager. If you select a new hotkey and pressing it causes strange things to happen, try reverting to the default value of Control-Q. If that works as expected, then the hotkey you tested is already used for some other function — try a different one.
The way that NTFS records time stamps often causes confusion. In
particular, Windows Explorer and the DIR
command (in both Take
Command and CMD.EXE) will show incorrect times if a file’s time was
recorded during Daylight Saving Time, but checked during Standard Time (or
vice versa.) For example, DIR
will display different time
stamps for the exact same file depending on whether you use it in May or in
December. PopInfo attempts to show the correct time regardless of when you
use it. The time stamps PopInfo displays may differ from what Explorer and
DIR
report — this is a deliberate feature and not a
bug! The /T
option allows you to enable or disable this
feature: /T:1
causes PopInfo to report times correctly;
/T:0
does it wrong, but agrees with Explorer and
DIR
.
POPINFO /T:2
causes the popup to display UTC times rather
than localized times. This option also affects the display format. When
/T:2
is used, dates are shown in ISO 8601 format, and times
in 24-hour format.
If the filename at the cursor is a directory rather than a file,
PopInfo will count the number of files and subdirectories within the
directory. This can be useful information, but it takes time to collect.
On slow media or old computers, the popup may be unacceptably slow. You
can turn this feature off with /C:0
.
/S
saves PopInfo’s current settings to the registry; they
will be used by default the next time you load the plugin. The settings
saved are the current hotkey, smart file times (/T
), and
subdirectory counts (/C
.) /R
attempts to restore
any saved settings from the registry; if nothing has been saved,
/R
will have no effect. All settings are saved under the key
HKCU\Software\JPPlugins\PopInfo.
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:
1.0.0 | 2010-07-26 | initial release |
1.0.1 | 2011-03-01 | fixes exit codes for POPINFO command |
1.0.2 | 2011-04-12 | fixed a problem with filenames containing wildcards under TCC 12.10 |
1.0.3 | 2011-10-10 | checks for older versions (before 11.00.48) and refuses to load in them |
1.0.4 | 2013-04-24 | converted to Visual Studio 2010; updated the plugin’s web address |
1.1.0 | 2014-10-29 | changes for TCC v17 compatibility |
Status and Licensing:
This plugin is Copyright © 2014, 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. Use it at your own risk. If you find a problem, you can report it in the JP Software support forum.
Download:
You can download the current version of the plugin from http://prospero.unm.edu/dl/popinfo.zip or ftp://prospero.unm.edu/popinfo.zip.