PowerShell module that extends the Unix touch command with reusable file presets.
CreatorFiles is a PowerShell module that brings the Unix touch command to Windows with modern enhancements. Create files, update timestamps, generate numbered copies, and - the killer feature - save reusable file templates as presets.
Perfect for developers, sysadmins, and anyone who regularly creates the same project scaffolding.
Install-Module CreatorFiles -Scope CurrentUser# Clone the repository
git clone https://github.com/Mister128/TouchModulePowershell.git
# Copy to your modules folder
Copy-Item -Path .\TouchModulePowershell\CreatorFiles -Destination "$env:USERPROFILE\Documents\WindowsPowerShell\Modules\CreatorFiles" -Recurse
# Import the module
Import-Module CreatorFiles# Create a single file
Touch "readme.md"
# Create multiple files at once
Touch "index.html", "style.css", "app.js"
# Create numbered copies
Touch "log.txt" -Count 7
# -> (1)log.txt, (2)log.txt, ..., (7)log.txt
# Save a project template
Save-TouchPreset -Name web-project -Files index.html, style.css, script.js
# Apply the template
Touch -Preset web-project -Path C:\Projects\my-site
# See all saved presets
Get-TouchPresetCreates new files or updates timestamps of existing ones.
| Parameter | Description |
|---|---|
-Name |
File name(s) to create or update. Accepts pipeline input. |
-Preset |
Name of a saved preset (mutually exclusive with -Name). |
-Path |
Target directory. Defaults to current directory. |
-Count |
Creates numbered copies: (1)file.txt, (2)file.txt, ... |
-Force |
Silently updates timestamps on existing files. |
Saves a file template for later use.
# Save a web project template
Save-TouchPreset -Name web-project -Files index.html, style.css, app.js
# Save with default path and count
Save-TouchPreset -Name week-logs -Files log.txt -Count 7 -Path C:\LogsLists all saved presets or inspects a specific one.
# List all presets
Get-TouchPreset
# Inspect a specific preset
Get-TouchPreset -Name web-projectDeletes a saved preset.
# Remove a preset
Remove-TouchPreset -Name week-logs
# Pipeline support
Get-TouchPreset -Name old-preset | Remove-TouchPresetPresets are stored in %APPDATA%\CreatorFiles\presets.json:
The module is covered by Pester 5 tests (24 tests).
# Install Pester 5 (if needed)
Install-Module Pester -Force -SkipPublisherCheck -Scope CurrentUser
# Run all tests
Invoke-Pester -Path .\Tests\Tests run automatically on every push via GitHub Actions.
- PowerShell 5.1+ (Windows PowerShell or PowerShell Core 7+)
- Windows 10/11 or Windows Server 2016+
- Pester 5+ (for running tests)
This project is licensed under the MIT License - see the LICENSE file for details.