skillfed

win32-setctime

A small Python utility to set file creation time on Windows

win32-setctime v1.2.0 6.3M downloads/30d#1,943 on PyPI47
Permissive license MIT license DORMANT released

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-setctime

uv

uv add win32-setctime

poetry

poetry add win32-setctime

Installing 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

Development Status :: 5 - Production/StableEnvironment :: Win32 (MS Windows)Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: MicrosoftProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTopic :: System :: Filesystems

Tags

windows file creation timeset file timestamp windowswin32 file metadatafile creation date modificationwindows filetime api
windows-onlyfile-metadata

More Filesystems packages