A lightweight implementation of the Unix touch command for Windows, written in Python.
touch creates a file if it does not exist. If the file already exists, its timestamp is updated without modifying its contents.
- Create files from the command line
- Update timestamps of existing files
- Touch multiple files in a single command
- Support file and directory paths
- Continue processing remaining paths if one operation fails
- Return a non-zero exit code when an operation fails
- No runtime dependencies
Touch a single file:
touch hello.txt
Touch multiple files:
touch one.txt two.txt three.txt
Paths containing spaces can be quoted:
touch "hello world.txt"
Existing files are not overwritten. Their timestamps are updated instead.
Installation instructions will be added when the package is published to PyPI.
This project uses uv for Python project and dependency management.
Clone the repository and run the command locally with:
uv run touch hello.txt
Run the help command with:
uv run touch --help
- Windows
- Python 3.14 or later
touch is currently in early development.
Version 0.1.0 implements the core touch functionality. Additional Unix touch options will be added in future versions.