Skip to main content

Force Delete Win

Force delete a file or folder held by other Windows processes, even if it is being used by other processes.

This can be used in race condition situations where a process has opened a folder and it tries to delete it just before closing the original handle.

This function will close all the handles of all the processes that have opened the requested file or directory, thus it may cause unexpected behavior on other programs or could leave your file system on an inconsistent state. USE THIS UNDER YOUR OWN RISK.

Dependencies

To compile force-delete-win sources, you must have Rust installed.

Installation

You can install this library by using either pip or conda:

# PyPi installation
pip install force-delete-win

# Conda installation
conda install force-delete-win -c conda-forge

Building from source

To build from sources, you will require both a working stable or nightly Rust toolchain with target x86_64-pc-windows-msvc, which can be installed using rustup.

Additionally, force-delete-win uses Maturin as the build backend, which can be installed using pip:

pip install maturin

To test your compilation environment settings, you can build force-delete-win sources locally, by executing:

maturin develop

This package depends on the following Rust crates:

  • PyO3: Library used to produce Python bindings from Rust code.
  • force-delete-win: Force file/folder deletion on Windows from Rust.
  • Maturin: Build system to build and publish Rust-based Python packages.

Usage

For using this package please do,

from force_delete_win import force_delete_file_folder

deleted = force_delete_file_folder(path_to_folder_or_file)

Test

We use pytest run our tests, just open a terminal and run,

Python

python runtests.py

Changelog

Visit our CHANGELOG file to learn more about our new features and improvements.

Contribution guidelines

We follow PEP8 and PEP257 for pure python packages and Rust to compile extensions. We use MyPy type annotations for all functions and classes declared on this package. Feel free to send a PR or create an issue if you have any problem/question.

Metadata

Release files for force-delete-win 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for force-delete-win 0.1.0
File Size Uploaded
force_delete_win-0.1.0.tar.gz 9.3 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for force-delete-win 0.1.0
File
force_delete_win-0.1.0-cp310-none-win_amd64.whl CPython 3.10 none Windows x86-64 Details
force_delete_win-0.1.0-cp39-none-win_amd64.whl CPython 3.9 none Windows x86-64 Details
force_delete_win-0.1.0-cp38-none-win_amd64.whl CPython 3.8 none Windows x86-64 Details
force_delete_win-0.1.0-cp37-none-win_amd64.whl CPython 3.7 none Windows x86-64 Details

Total release size: 502.3 kB

Release files / force_delete_win-0.1.0.tar.gz

Download URL force_delete_win-0.1.0.tar.gz
Size 9.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d00fcc3f6266ea52668839fcb941a6aa2fe13854a94e96bf9b65918ca6d90607
BLAKE2b-256 checksum
How to use checksums
b35d6a4e3932b2622ef1b35992fa3d0fe682a21b1cc85e56ca0ae3804b13e138
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.13.6

Release files / force_delete_win-0.1.0-cp310-none-win_amd64.whl

Download URL force_delete_win-0.1.0-cp310-none-win_amd64.whl
Size 123.3 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
5dfd19f91a9e60017aba1a32f73b430b6702e51557d74ea864f919223153595e
BLAKE2b-256 checksum
How to use checksums
9c687333f77b4fb85a115f82f9771deee066379414d77ec040e2c12926d02d29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.13.6

Release files / force_delete_win-0.1.0-cp39-none-win_amd64.whl

Download URL force_delete_win-0.1.0-cp39-none-win_amd64.whl
Size 123.3 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
feb961b6e6e46b98bc4543d36687ae0a7efae51f28c1f80f9ceb0df4e2bb64c3
BLAKE2b-256 checksum
How to use checksums
517d01ca3214c556a9951d2ceb81253f8d4b392ddc0892ef2129d80f12bb02f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.13.6

Release files / force_delete_win-0.1.0-cp38-none-win_amd64.whl

Download URL force_delete_win-0.1.0-cp38-none-win_amd64.whl
Size 123.2 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
e77f193a7a3943e89418d6a08997b0dcc1c3ed4c94529aff58da69c6a33f533f
BLAKE2b-256 checksum
How to use checksums
86bc0ee869e941e7e3a675b68829041fa156734b72d792a324b396f00f0333cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.13.6

Release files / force_delete_win-0.1.0-cp37-none-win_amd64.whl

Download URL force_delete_win-0.1.0-cp37-none-win_amd64.whl
Size 123.2 kB
Tags CPython 3.7 Windows x86-64
SHA-256 checksum
How to use checksums
98302d59303a7a9ca5ed952d7f097edaa56da44c4adfc7e3c279b5df2df48f9e
BLAKE2b-256 checksum
How to use checksums
4f07e77dadd3829057c9dc74bbadbf766f91f6296d1b743dd92e45e055fa6492
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.13.6

Release history Release notifications | RSS feed

This release

0.1.0 This release

5 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page