Touching files in Windows

Last update: 4 August 2017

Touch files in Windows (update Timestamp)

Summary

Sometimes it is necessary to update a files timestamp without changing the content (e.g. replacing a .dll file).
This operation is called "touching" and there is even a command called touch for use on Linux systems.

There are multiple ways to accomplish this operation in Microsoft Windows, but the easiest one is using the copy command.

Solution

Use the following syntax in any Windows shell to update the timestamp of a file to the current system time:

copy /b +

/b is the parameter for binary mode.

must be replaced with the name of the file to be touched.

The + is used to merge files. When used as shown above this means source = destination.

Information

For further information visit the copy command-line reference: http://technet.microsoft.com/en-us/library/bb490886.aspx

Why is this necessary?

Fabasoft Folio uses an an auto-update feature on the Kernel-based servers (Webserver, Conversion etc.) called „Bootstrap“. During the bootstrap the server checks if newer files (for example DLLs to execute the Fabasoft Folio Kernel) are located in your Fabasoft Folio domain. If files in the domain are newer then at the local system, these new files are copied from the Backend server to the local server. One situation you possibly need to touch a file is, if you try to create a trace (for example, a Kernel trace) and you overwrite the original dll with a trace dll provided by Fabasoft. The „Bootstrap“ may detect that the trace dll is older than the original one, and overwrite the trace dll. The original dll will not trace and the recorded trace will stay nearly empty (no tracing output).

Further questions?