CCLIWindows CMDWin32 APISystems Programming
touch: CLI File Creator for Windows
A lightweight systems utility written in C that replicates the UNIX 'touch' command on Windows CMD and PowerShell with support for batch file creation.
1 min readOct 29, 2026
Overview
Developers working on Windows CMD frequently encounter missing native equivalents to common UNIX utilities like touch. While PowerShell provides New-Item, its syntax is verbose and cumbersome.
This utility is compiled in pure C using GCC/MinGW to deliver instantaneous execution and native binary efficiency.
Highlights
- Compiles to a single standalone executable (< 25 KB) with zero external dependencies.
- Handles multiple arguments simultaneously (
touch file1.txt file2.js style.css). - Safely preserves existing files and updates access timestamps without corrupting contents.