win32-setctime is a small Python utility designed to set the creation time (ctime) of files and directories on Windows operating systems. It currently is at version 1.2.0 and has an infrequent, but active, release cadence, with updates typically addressing bug fixes, accuracy improvements, or new features.
pip install win32-setctimeVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to create a file, then use `setctime` to modify its creation timestamp to a specific point in time (in this case, one day in the past).
Ensure your code path for `setctime` is only executed on Windows, typically by checking `sys.platform == 'win32'`.
Upgrade to version 1.0.4 or higher to ensure accurate timestamp conversion for all valid values.
To prevent following symlinks, call `setctime(path, timestamp, follow_symlinks=False)`.
Upgrade to version 1.0.3 or higher to gain support for setting the creation time of directories.
Update the `win32-setctime` package to its latest version using `pip install --upgrade win32-setctime`.
Run the Python script with administrator privileges, ensure no other applications are holding a lock on the file, or verify that the current user has sufficient write permissions to the target path.
Install the package using `pip install win32-setctime`, and ensure your code uses `import setctime`.
Ensure you are running the script on a Windows operating system where `pywin32` can be installed (which is typically handled as a dependency when `win32-setctime` is installed). If on a non-Windows OS, `win32-setctime` cannot be used.
No dependency data recorded yet.