win32-setctime
A small Python utility to set file creation time on Windows
What it is and what it does
win32-setctime is a small, focused utility that wraps Windows API calls to set file creation timestamps from Python. It exposes a single function, setctime(), that takes a file path, a Unix timestamp, and optional symlink-following behavior. The package has no runtime dependencies and installs as a pure Python wheel.
This is useful when you need precise control over file metadata on Windows—for instance, when restoring files from backups, synchronizing timestamps across systems, or implementing custom file management workflows. The package supports Python 3.5 through 3.13 and is marked Production/Stable, though development has been dormant since its last release.
Use it for:
- Restore original file creation timestamps when extracting or copying files from backups on Windows.
- Synchronize file timestamps between a source and destination during file mirroring or replication tasks.
- Implement custom file archival or version-control workflows that require precise creation-time metadata.
- Automate batch file timestamp corrections for compliance or audit purposes on Windows systems.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Sets file creation time on Windows systems via Python, allowing you to modify the creation timestamp of files programmatically.
Yes, if you are on Windows and need to set file creation times programmatically. The package is stable, has no dependencies, and installs easily. The dormant maintenance status is not a concern for a small, single-purpose utility with no external dependencies. Not applicable on non-Windows systems.
Install
win32-setctime on PyPI
pip
pip install win32-setctimeuv
uv add win32-setctimepoetry
poetry add win32-setctimeInstalling win32-setctime
Before you install
Low friction to install; no runtime dependencies. Maintenance is dormant—last commit was 2024-12-07, but the package is marked Production/Stable and has seen no recent activity requiring updates.
License in practice
MIT license (permissive) means you can use, modify, and distribute this package freely with minimal restrictions, including in commercial software.
Quickstart
from win32_setctime import setctime
setctime("my_file.txt", 1561675987.509, follow_symlinks=True)
Windows-only; will not work on macOS or Linux systems.
Verify before relying
- Whether the package handles edge cases like symbolic links correctly across all supported Windows versions.
- Performance characteristics when setting timestamps on large numbers of files in batch operations.
Package facts
| License | MIT license (permissive) |
| Python support | supports the current Python release (>=3.5) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 615 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 6,270,976/month — #1,943 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: win32_setctime-1.2.0-py3-none-any.whl
Keywords: win32, windows, filesystem, filetime
Tags
More Filesystems packages
Watches file system changes and triggers…
permissive · top 1,000 on PyPI
watchdogWatchdog monitors file system events across…
permissive · top 1,000 on PyPI
portalockerPortalocker provides cross-platform file…
permissive · top 1,000 on PyPI
filetypeInfers file type and MIME type by examining…
permissive · top 1,000 on PyPI
pathvalidateSanitize and validate filenames and file paths…
permissive · top 5,000 on PyPI
pathlibProvides object-oriented filesystem path…
permissive · top 5,000 on PyPI
pyinotifyMonitors Linux filesystem events (file…
permissive · top 5,000 on PyPI
PymemPymem provides direct read and write access to…
permissive · top 15,000 on PyPI
win-precise-timeProvides high-resolution time measurement and…
permissive · top 15,000 on PyPI
nanotimeNanotime provides a 64-bit UNIX timestamp type…
permissive · top 15,000 on PyPI
pyinstaller-versionfileGenerates Windows VERSIONINFO resource files…
permissive · top 15,000 on PyPI
timesTimes converts between universal (UTC) time and…
permissive · top 15,000 on PyPI
py3createtorrentCommand-line utility to create torrent files…
copyleft · top 15,000 on PyPI
python-fsutilProvides a high-level API for common…
permissive · top 5,000 on PyPI
PyGetWindowPyGetWindow provides functions to query,…
permissive · top 5,000 on PyPI
pywinautoAutomate Microsoft Windows GUI interactions by…
permissive · top 5,000 on PyPI