Polenta Touch - PTouch
Description
PTouch is a Windows clone of the Unix touch command. It creates empty files or updates the access and modification timestamps of existing files. Perfect for automation scripts, build systems, and file management tasks.
Platform: Windows 10/11 (x64)
License: Freeware
Version: 1.0.0
Features
PTouch provides full control over file timestamps with Unix-compatible options:
-
Create Empty Files
Create new empty files if they don't exist. Perfect for initializing log files, lock files, or placeholder files in your scripts. -
Update Timestamps
Update access and modification times of existing files to the current time, or set them to specific values. -
Access Time Only (
-a, --access)
Update only the access time, leaving the modification time unchanged. -
Modification Time Only (
-m, --modify)
Update only the modification time, leaving the access time unchanged. -
No Create Mode (
-c, --no-create)
Don't create files if they don't exist. Only update timestamps of existing files. -
Reference File (
-r, --reference)
Use the timestamps from another file instead of the current time. Great for synchronizing file times. -
Custom Timestamp (
-t, --time)
Set a specific timestamp using formats like202501151430or2501151430. -
Multiple Files
Touch multiple files in a single command. Process entire directories efficiently. -
Lightweight & Portable
No installation required! Just a single executable that's ready to use in your scripts, batch files, or automation workflows. Zero dependencies. -
Quick Links (
-ws, --website/-don, --donate)
Open the Polenta Connection website or donate page directly from the command line.
Usage
PTouch.exe [options] file1 [file2 ...]
Examples
PTouch.exe file.txtCreate file.txt if it doesn't exist, or update its timestamp to current time
PTouch.exe file1.txt file2.txt file3.txtTouch multiple files at once
PTouch.exe -c file.txtOnly update timestamp if file exists (don't create)
PTouch.exe -a file.txtUpdate only the access time
PTouch.exe -m file.txtUpdate only the modification time
PTouch.exe -r reference.txt file.txtCopy timestamps from reference.txt to file.txt
PTouch.exe -t 202501151430 file.txtSet timestamp to January 15, 2025 at 14:30
PTouch.exe -t 2501151430 file.txtSet timestamp (year 2025, Jan 15 14:30)
PTouch.exe -t 01151430 file.txtSet timestamp using current year (Jan 15 14:30)
Timestamp Format
The -t, --time option accepts timestamps in the format:
[[CC]YY]MMDDhhmm[.ss]
202501151430= 2025-01-15 14:30:002501151430= 2025-01-15 14:30:00 (year 2025)01151430= Current year, January 15 14:30:00202501151430.45= 2025-01-15 14:30:45