Skip to main content

Useful tools for files

Project description

forfiles

forfiles has useful tools for files and images.

Installation

Use the package manager pip to install forfiles.

pip install --upgrade forfiles

Usage

from forfiles import file as f, image as i, directory as d

# file tools
f.filter_type("C:/Users/example/Downloads/directory-to-filter/", [".png", ".txt", "md"])
f.dir_create("C:/Users/example/Downloads/directory-to-create/")
f.dir_delete("C:/Users/example/Downloads/directory-to-delete/")

# image tools
i.scale("C:/Users/example/Downloads/boat.png", 1, 1.5)
i.resize("C:/Users/example/Downloads/car.jpg", 1000, 1000)
i.to_png("C:/Users/example/Downloads/plane.jpg")

# you can also operate whole directories
d.dir_action("C:/Users/example/Downloads/cats/", True, image.scale, 2, 2)
d.dir_action("C:/Users/example/Downloads/giraffes/", True, image.resize, 1000, 1000)
d.dir_action("C:/Users/example/Downloads/tortoises/", True, image.to_png)

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

forfiles-4.1.1.tar.gz (5.9 kB view hashes)

Uploaded Source

Built Distribution

forfiles-4.1.1-py3-none-any.whl (6.0 kB view hashes)

Uploaded Python 3

Supported by

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