TouchPro

TouchPro is a Windows program that allows you to modify (or "touch") any, or all, of a file's time & date values. TouchPro fully integrates with Windows File Explorer, appearing as Explorer right click context menu items on files and folders. By integrating with Windows File Explorer it gives you the ability to affect the timestamps of:

As well as setting the time and date to specific values, it can also offset times, allowing you to adjust for such occurrences as incorrect times on cameras.

Its name comes from the Unix touch command, in combination with it originally being a Windows Explorer property sheet extension.

TouchPro - Copyright © 1996-2023 JD Design, All Rights Reserved

Contents

Installation

We recommend that you download and unzip the appropriate zip file for your operating system, and run the Setup.exe from your local disk.

You need to run the installation from an account with Administrator privileges, though you shouldn't need to run the setup.exe As Administrator; the installation will automatically prompt for elevation when needed.

The last step of Setup informs you that TouchPro is installed and briefly tells you how to use it.

If you're upgrading an existing version, we recommend that you log off and back on again, or restart your computer to ensure Windows File Explorer has unloaded the prior version, otherwise it may appear that you still have the prior version.

If your system administrator has applied the EnforceShellExtensionSecurity policy, to limit the use of shell extensions to approved ones, they will need to add TouchPro to that list in the registry:

Create a REG_SZ value whose name is "{AD6C3BE1-DD8A-11ce-872F-444553540000}" under HKLM\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved.

Administration Installation

The installer supports the MSI administrative installation options.

For example:

msiexec /jm touchpro.msi

"Advertises" TouchPro on all the machine's users Programs menu items. When a user invokes one of the start menu TouchPro items, the installation of TouchPro will complete.

or:

msiexec /a touchpro.msi

Performs an "administrative" installation to a shared network location.

Files Installed

TouchPro setup installs files to the following directories:

%ProgramFiles%\JD Design\TouchPro The main installation directory that contains the core program files, including:
  • The TouchPro shell extension DLL
  • The FileTms command line utility program
  • The TouchProp command line program
  • TouchCmd, the command line version of TouchPro
%ProgramFiles%\JD Design\TouchPro\doc The documentation directory, contains this document, the revision history, and related image files.

Setup will also add relevant registry entries and Start menu items.

How do you use TouchPro?

Use Windows File Explorer and select the file(s) or the directory whose timestamps you want to modify.

If you want to change the timestamps of a single file, navigate to it in Windows File Explorer, right click it and use the TouchPro context menu:

Single File Selection

Similarly, if you want to modify all the files in a directory, select all the files in Windows File Explorer, right click on the selection and use the TouchPro context menu.

If you want to modify all the files in all sub-directories under a directory, select the directory, right click it, open TouchPro and set the "Recurse into folders" option.

If you want to alter all the items of a search result in Windows File Explorer:

  1. Perform the search operation (such as all files of a particular type, or all files in a date range)
  2. Select all the files you want in the search results pane
  3. Right click on a file in the selection and use the TouchPro context menu:

Multiple File Selection from Search Results

Single and Multiple Settings Modes

Prior to V6, TouchPro only had a single set of saved settings. From V6.0.1 you have the option to operate in single or multiple settings mode (see the Extra Options dialog, Single settings mode option).

The context menu items operate in a consistent manner for both modes; the only difference between them is that in single settings mode, you don't need to choose a tpsettings file, a default one is used.

In single settings mode TouchPro uses a single tpsettings file located below your personal APPDATA folder:

 %APPDATA%\JD Design\TouchPro\TouchProSettings.tpsettings

 %APPDATA% is system dependent, but is normally C:\Users\YourAccount\AppData\Roaming

The Context Menu Operations

Menu Item Single Settings Mode Operation Multiple Settings Mode Operation
Open Opens the main TouchPro dialog Opens the main TouchPro dialog
Touch with Current Time and Date1 Uses the last saved settings and the current time and date
  1. Opens a file selection dialog to pick a previously saved tpsettings file.
  2. Use those loaded settings and the current time and date.
Touch with Saved Settings1 Uses the last saved settings. Opens a file selection dialog to pick a previously saved tpsettings file and uses those settings.
Touch with the Focused item's (modified) timestamp1 Uses the last saved settings and the modified file time and date of the focused item2
  1. Opens a file selection dialog to pick a previously saved tpsettings file.
  2. Use those loaded settings and the focused item's modified timestamp.
Capture a timestamp from the focused item1 Opens the Select Timestamp dialog where you can choose one of the focused item's timestamp properties to overwrite the last saved settings timestamp
  1. Open the Select Timestamp dialog where you can choose one of the focused item's timestamp properties.
  2. It then shows the file selection dialog to pick a previously saved tpsettings file whose timestamp is overwritten with the previously selected value.
1 Only enabled in a registered installation
2 The "focused" item is the item you click in a multiple selection. In a single selection, it's the same as the (sole) selected item.

The main TouchPro Dialog

TouchPro Dialog

1. Modify these times

Select from the 3 check boxes, the combination of timestamp values you want to change.

The following table shows which properties are affected by which options.

Files & Folders Document time properties Picture time properties Video/media time properties
Created System.Document.DateCreated PropertyTagExifDTOrig (System.Photo.DateTaken) System.DateAcquired
Modified System.Document.DateSaved *PropertyTagDateTime System.DateImported
Accessed System.Document.DatePrinted *PropertyTagExifDTDigitized System.Media.DateEncoded
  * These tags are not generally shown in Windows File Explorer

2. Options

Touch Folders Apply the timestamp value to any selected folders.
Touch Files Apply the timestamp value to any selected files.
Read-only items Any read-only items are temporarily changed to writable to enable their timestamp values to be changed. If you leave this off, read-only items are not altered.
Recurse into Folders If any folders are selected, the operation processes items in those folders (and sub-folders)
Document time properties Apply the timestamp value to any selected "document" file properties shown above
Picture time properties Apply the timestamp value to any selected picture file properties shown above
Video/media time properties Apply the timestamp value to any selected video file properties shown above
Save As * Opens a standard Save As dialog allowing you to save the current settings to a tpsettings file.
Load * Opens a standard Open dialog box allowing you to load settings from a tpsettings file.
Extra Options Displays the "Extra Options" dialog box shown below.
* In single settings mode, "Save As" is "Save", and "Load" is disabled.
The Extra Options dialog box

3. Extra Options

The "Touch shortcut target" option will alter the timestamps of the target of shortcut files (.lnk files) rather than the shortcut file itself.

The "set the archive attribute after touching", does what it says.
You may find this option useful if your backup application uses the archive attribute to determine if it needs to backup a file. If a file has previously been archived and you touch it to alter some of its file system timestamps, without this option set, your backup program may not subsequently backup the changed version. Having this option off, does not mean that the archive attribute is cleared.
We recommend that you always set this - unless you find some circumstance where it's specifically not what you want.

The User Interface and Notification section options are per-user personal settings; they are not saved in the tpsettings files.

The User Interface Options items control the format of the time and date controls on the main dialog and whether TouchPro operates in single or multiple settings mode.

The Notification Options items control how TouchPro notifies completion and whether it displays a list of failures, should any operations not succeed.

Populate time fields button

4. Populate the time and date controls

From the main dialog, you can populate the time and date controls with the current time, or from an existing timestamp of the focused item when you invoked TouchPro:

Select Timestamp dialog

Note that when you invoke the "Set time & date from the selected item's timestamp" menu item, if the selected item in File Explorer is a shortcut (.lnk) file, if you hold down the shift key, the target file of the shortcut is used rather than the shortcut file.

The following table shows the types of files TouchPro can read, and indicates the internal properties used by TouchPro:

Document files (Microsoft Office files and other "document" file types)
Created Date Created System.Document.DateCreated PKEY_Document_DateCreated
Modified Date Last Saved System.Document.DateSaved PKEY_Document_DateSaved
Accessed Last Printed System.Document.DatePrinted PKEY_Document_DatePrinted
Picture files (JPG, PNG, TIFF)
Created Date and time the picture was taken System.Photo.DateTaken PropertyTagExifDTOrig
Modified Date and time the image was generated   *PropertyTagDateTime
Accessed Date and time of digital data generation *PropertyTagExifDTDigitized
Video/media files
Created Date acquired System.DateAcquired PKEY_DateAcquired
Modified Date imported System.DateImported PKEY_DateImported
Accessed Media created System.Media.DateEncoded PKEY_Media_DateEncoded
* These tags are not generally shown in Windows File Explorer

5. Toggle between fixed and offset date/times

Using the Fixed/Relative period button you can switch TouchPro between setting a fixed time, or an offset from a current timestamp. When you switch to offset time mode, the normal time and date entry controls change to:

Time Offset Controls 

This allows you to offset the file's existing times by Days, Hours, Minutes and Seconds. This can be useful if your camera's time settings were set incorrectly.

TouchPro Notes

Windows Shortcuts (.lnk files)

From V6.3 you can configure whether to touch shortcut targets. With this option set, TouchPro will alter the target file of a shortcut rather than the shortcut (.lnk) file itself. Additionally, when invoking commands that use the focused item's timestamp, if you hold the shift key down when invoking the operation, the shortcut's target file is used rather than the shortcut file.

Command Line Version - TouchCmd

Along with the shell extension GUI version, there is a command line version (TouchCmd) that gives you the same facilities as TouchPro via a command line interface, allowing you to automate any operations that you need to repeat frequently and consistently.

You can find TouchCmd in the TouchPro installation directory. The default directory is %Program Files%\JD Design\TouchPro.

To easily use the command line version from any command window, you will need to add the TouchPro installation directory to your computer's PATH environment variable. If you use the TouchCmd Command Prompt (accessible from the Start menu), this is done automatically. You can do this for the current command prompt using the set command, alternatively, you can use the "Advanced system properties" - System Properties, Advanced page, Environment Variables dialog.

Usage:

TouchCmd [/T[time] /D[date] /C /M /A /O /F /S /R /E /BJ /BD /BS /P0|1 /H] path

/T[time] Specify the time to use, or omit [time] to use current time
/D[date] Specify the date to use, or omit [date] to use current date
/C Created Timestamp
/M Last Modified Timestamp
/A Last Accessed Timestamp
/O Touch Folders
/F Touch Files
/S Process sub-directories
/R Touch Read-only files
/E+/-d:h:m:s Offset timestamp days:hours:mins:secs
/BJ Touch embedded dates in picture file properties
/BD Touch embedded dates in document properties (normally Microsoft Office file formats)
/BV Touch embedded dates in video/media files
/BS Touch the target file of a shortcut file (.lnk files)
/BA Set the archive attribute after touching
/P Force operating system mode. 0 = Windows 7 (and later); 1 = Pre-Windows 7
/H Displays this information
path [drive:][path][filename] (wildcards supported)

Enter the time and date parameters in your regional format as set in your Regional Settings.

Examples

To touch all the files in a directory:

TouchCmd ... /F "dirname/*.*"

To touch all the files in a directory & sub-directories:

TouchCmd ... /F /S "dirname/*.*"

To touch a directory:

TouchCmd ... /O "dirname"

To touch a directory and all sub-directories:

TouchCmd ... /O /S "dirname"

To touch all files and directories in a directory:

TouchCmd ... /F /O "dirname/*.*"

To touch all files, directories, and sub-directories in a directory:

TouchCmd ... /F /O /S "dirname/*.*"

Note that the above examples quote the directory/filename to cater for names that contains spaces.

Note: If you want to check which files will be touched without actually altering them, invoke the command without specifying /T, /D, or /E parameters.

Time Offset Usage

This changes the last modified timestamp by -12 hours:

TouchCmd /M /F /E-0:12:0:0 filename.ext

Saving and Restoring Timestamps

In conjunction with our FileTms utility, TouchCmd allows you to save and restore file timestamps.

1. Use FileTms to output the file's current timestamp values to a batch file using command line redirection:

filetms filename.ext -t > tpcmd.bat

The tpcmd.bat file created then looks something like this:

TouchCmd /F /C /D09/05/1980 /T01:00:00 filename.ext
TouchCmd /F /A /D24/07/2002 /T22:10:03 filename.ext
TouchCmd /F /M /D09/05/1980 /T01:00:00 filename.ext

2. Perform your file operations that result in the timestamps changing.

3. Run the tpcmd.bat batch file to restore the original timestamps.

Note

Since Windows Vista, Windows may not update the Last Accessed timestamp when files are accessed. However, that can be changed using the fsutil behavior set command with the disablelastaccess setting. If last access is enabled beware that many operations in Windows access files, such that even opening the context menu on a file is likely to update the last accessed time. Consequently it may be difficult to ascertain that touch operations on the last accessed time work. Our FileTms command line utility provides a non-destructive way of viewing a file's timestamps.

Unicode characters with the command line

If you don't see the correct character you may need to change the font used by the command window - use the command prompt's Properties, Font page to choose a suitable font. Courier New contains a large number of the Unicode glyphs, so that's always a good choice if you need to try an alternative.

Also, use the following command to set the console code page to UTF-8. This is done automatically in the TouchPro Command Prompt shortcut in the Start menu:

chcp 65001

Using the command line utilities with PowerShell

You can set the path to the TouchPro commands in PowerShell using:

$Env:Path += ";" + $Env:ProgramFiles + "\JD Design\TouchPro"

Unicode file names and redirection in PowerShell

PowerShell currently doesn't play well when redirecting Unicode console program output. Although you can redirect the output from FileTms in the same way that you can in a command prompt window, Unicode characters don't produce the expected output regardless of the current code page. Consequently, FileTms has the ability to directly write its output to a file using its -F parameter as shown below.

Although output to the PowerShell console is correct, when redirected to a file it's not. For example:

filetms '.\ABC العالم العربي (Arabic) ʓ.txt'

Will output to the console:

ABC العالم العربي (Arabic) ʓ.txt

However, if you redirect the output:

filetms -T '.\ABC العالم العربي (Arabic) ʓ.txt' > test.ps1

Then look at the test.ps1 file in Notepad, it contains:

ABC Ϻ┘äÏ╣Ϻ┘ä┘à Ϻ┘äÏ╣Ï▒Ï¿┘è (Arabic) ╩ô.txt

The same happens if you use:

filetms -T '.\ABC العالم العربي (Arabic) ʓ.txt' | Out-File -FilePath ".\test.ps1"

However, with the -F parameter:

filetms '.\ABC العالم العربي (Arabic) ʓ.txt' -F".\test.ps1"

The test.ps1 file contains the expected characters and can be run from PowerShell.

File Timestamps and DST (Daylight Saving Time) Quirks

Prior to V5.2 TouchPro converted between the file time (UTC) and local time using Windows functions that have existed since Windows NT. These functions were flawed when the time was in a period outside the current daylight saving time (DST) period. However, since Windows File Explorer (before Windows 7) also used the same functions, the result was consistent with what Windows itself displayed. Since Windows 7, File Explorer uses newer functions that correctly convert between local and UTC times in different DST periods.

From V5.2, TouchPro uses the newer Windows functions to do the local time conversion to be compatible with Windows 7 and later. V5.3 and later revert back to the older ones on operating systems prior to Windows 7 so that results on all supported operating systems appears consistent (from the same operating system).

If you have access to both Windows 7 (or later) and Windows XP (or Vista) you can verify this display anomaly by copying a file (with a timestamp in the non-current DST period) between the systems, and examining the file's timestamps shown by Windows File Explorer on those operating systems - you'll normally see a 1 hour difference (if your DST time change is 1 hour).

Note that even with Windows 7, the command prompt "dir" command still shows the timestamp using the older method - so it's inconsistent with File Explorer. If you want to see the same timestamp as File Explorer in Windows 7 (or later), the latest version of our FileTms command line utility (installed with TouchPro) now displays the timestamps consistently with the operating system's Windows File Explorer behaviour.

There's a Microsoft example of how to view this anomaly (in pre-Windows 7 operating systems) here - under the section "Local time conversion in Windows".

See the TouchPro FAQ on our web site https://www.jddesign.co.uk/ for other general information on file timestamps.

Beware the "Date" column property in Windows File Explorer details mode

In Windows File Explorer, when in Details mode view, you can choose which properties of files to display as columns. One of these is named simply "Date", but unlike the other date properties it's anything but simple.

Quite which property of a file is displayed depends on the type of file, and which internal metadata date/time properties a particular file has (or doesn't have). It can be very misleading to rely on this feature. We recommend that you ignore it.

See the article "How does Explorer calculate the “Date” of a file?" from Raymond Chen for further information.

Registered Version Features

The registered version of TouchPro adds the following advanced features:

Registering

The easiest way to register is online using one of the secure card payment facilities on our web site.

When you receive your registration key, copy it from the email and paste it into the field on the About dialog box. You can access this dialog from the main TouchPro dialog's Register button.

Updates

Any updates to the current version are free to registered users by downloading the latest version from our web site. You may need to email us for an updated registration number.

Removal

Locate the "TouchPro" item in Apps and Features (previously Control Panel, Add/Remove Programs) list.

Support

We maintain a list of frequently asked questions on our web site. If you have a technical question, please check there to see if you can find an answer before contacting us.

We will post the latest versions of our utilities on our web site as soon as they are available, so please take a look to keep up to date and to see what other software and services we offer.

If you have any suggestions for improvements to any of our utilities, please contact us via email (our up-to-date address is on our web site's contacts page). It's always good to hear from people using our products, and we appreciate you taking the time to tell us.

Thanks
JD Design
https://www.jddesign.co.uk/