GithubHelp home page GithubHelp logo

move-my-files's Introduction

move-my-files

mmf is a cli tool for organising files on your computer. Tell it the file name patterns, where to move and matching files from a source directory are moved to target directory. Run it as one-off command or in watch mode to continously observe a source directory.

Installation

Prerequisites:

  • Python >=3.5
  • pip package manager

Install mmf using:

# Install or upgrade mmf
pip install move-my-files -U

Usage

Move files using either one time command or watch mode:

# Supply source and destination directory explicitly
mmf move --source ~/Documents --dest-dir ~/Documents/images --pattern .png

# Uses predefined configuration(provided in using add command)
mmf move --source ~/Documents

# Watch ~/Documents directory for moving files
mmf move --source ~/Documents --dest-dir ~/Documents/images --pattern .png --watch
mmf move --source ~/Documents --watch

Define your favorite configurations using add command. This command keeps track of your configurations so they are not required to be typed in future. Use list command to list configurations you've previosly added.

# Add configuration
mmf add --dest-dir ~/Documents/images --pattern .png --name imagefiles
mmf add --dest-dir ~/Documents/pyfiles --pattern .py --name pyfiles

# List configurations (previously added)
mmf list

# move without --dest-dir will use configurations
mmf move --source ~/Documents --watch

Available shortcuts for options:

  • --source: -s
  • --dest-dir: -d
  • --pattern: -p
  • --watch: -w
  • --name: -n

Development

Fork and clone this repository to develop on latest master branch. General steps to execute python code from this repo:

# Create development environment
cd /move-my-files
python3 -m venv .env && source .env/bin/activate
pip install -e '.[dev]'

# Execute CLI (from code)
cd ./app
python3 .
python3 . list
# Or directly
mmf --help

Local testing with unit tests and CLI:

# Run available unit tests
python3 -m pytest tests -v

# Install CLI locally to test (basically testing setup.py)
pip install -e .
mmf --help

You can also use tox to test on different environments.

For Packaging and publishing see here:

Contribute

If you have ideas to improve this tool, feel free to raise a new issue in the Issues section or open a PR :)

move-my-files's People

Contributors

jan25 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

move-my-files's Issues

MV of tmp files instead jpg

Hi,

i have setup mmf to move only .jpg
C:\Python37\Scripts\mmf.exe move --source "D:/Downloads/Test" --dest-dir "D:/Downloads/TestMove" --pattern .jpg --watch

The script also moves file.jpg.tmp

BP

Phil

Setup CI for unit tests

Setup CI to trigger tests with tox. Tests should run on each PR and merging to master.

Things to be done:

  • Use Github Actions
  • Add badges in README

No mv on duplicate files

Hi,

if i copy the files again in the source folder, the mmf stops operating.
Can you modify the cli by moving the file and rename it?
dest/file1.jpg
dest/file1(2).jpg

BR,

Phil

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.