Skip to main content

Find file or folder by Python, Faster than Windows File Explorer.

Project description

python_find_file_name

find file or dir location.

Install

pip install wfind

Usage

python -m find "base_path" "file_or_directory_name"

python -m find --base_path "C:\" --pattern ".mp4"
python -m find --base_path "C:\" --pattern "mat" --mode "in" --folder
python -m find --base_path "C:\" --pattern ".png" --mode "in" --file
python -m find --base_path "C:\" --pattern ".pdf$" --mode "re"
python -m find --base_path "C:\" --pattern "*.jpg" --mode "fm" 

python -m find --help
usage: Python File Finder [-h] [-p BASE_PATH] [-d PATTERN] [-file] [-folder] [-m MODE]

Find File or Folder Name.

options:
  -h, --help            show this help message and exit
  -p, --base_path BASE_PATH
                        base path
  -d, --pattern PATTERN
                        dest pattern
  -file, --file         only search file
  -folder, --folder     only search folder
  -m, --mode MODE       mode: -m in, -m fm, -m re

source and reference

https://stackoverflow.com/a/1724723/19470749
https://www.runoob.com/python/os-walk.html

Why I need this script?

I don't know where the huggingface download the model, and after search I know it download to cache folder, but I don't know where it is, so I directly use this script to search D drive and C drive, and then success find.

find("*text_encoder*", "D://")
find("*text_encoder*", "C://")

Notice, you can also set huggingface cache dir

pipe = CogVideoXImageToVideoPipeline.from_pretrained(model_id,text_encoder=text_encoder,transformer=transformer,vae=vae,torch_dtype=torch.float16,cache_dir="D://3")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wfind-0.0.3.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wfind-0.0.3-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file wfind-0.0.3.tar.gz.

File metadata

  • Download URL: wfind-0.0.3.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for wfind-0.0.3.tar.gz
Algorithm Hash digest
SHA256 eb510b54ce1fb498de4d2338f5f5031ab38298da63362963104d8edfa2594762
MD5 9f06c0fb6ed03c8e5dd3b669d4290231
BLAKE2b-256 dc2dd470e2c91e90fa04f7cb8ce0df5d8472a179bc748451c70f7d9854cf2d02

See more details on using hashes here.

File details

Details for the file wfind-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: wfind-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for wfind-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 aeca1fcbb8bbbf3cf288be70f57d1a908bd1b78ea4071f326e61602e00d5b42e
MD5 6b5bfe7b847e1d35133d924221e3f1b6
BLAKE2b-256 bbada9561a7a44dea3aa7d776e0375cb3b3337beea60e4e5241d78a0c487a81d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page