Coder Social home page Coder Social logo

file_finder's Introduction

File Finder

This command-line tool searches for files using specific criteria within a given directory.

Installation

Before using the tool, make sure you have Python installed. Then, install the required dependencies:

pip install ffinder

Usage

ffinder --help
  • [PATH]: (optional) Path to the directory to search in. If not provided, the current directory will be used.
  • -k, --key: Required. Define a search key.
  • -v, --value: Required. Define a search value.
  • -r, --recursive: (optional) Perform a recursive search within subdirectories. Default is non-recursive.
  • -s, --save: (optional) Save a report in the current directory.
  • -c, --copy-to: (optional) Copy found files to the specified directory.

Example

ffinder -k ext -v .zip -r -s -c /zips

This command will search for all files named "example.txt" recursively starting from the current directory. It will save a report in the current directory and copy the found files to /path/to/copy.

Supported Search Keys

  • name: Search files by name.
  • extension: Search files by extension.
  • date modified: Search files by last modified date.

Notes

  • If no path is provided, the tool will search in the current directory.
  • If multiple files with the same name are found during copy operation, the tool will append a timestamp to the copied file's name to avoid overwriting.

Credits

This tool uses click for command-line interface, tabulate for tabular data formatting, and pathlib for file operations.

file_finder's People

Contributors

migueluff avatar

Watchers

Miguel Freitas avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.