Code Monkey home page Code Monkey logo

sdcopy's Introduction

sdcopy

sdcopy is a command-line tool designed to copying files from your camera or any SD cards into structured folders based on the last modified time.

The tool offers flexibility through a config file or command-line options, allowing you to customize the destination folder structure and handle different type of files effectively.

Features

  • Timestamp-based Organization: Files are copied to the destination directory with folders structured according to their modification timestamps.
  • Customizable Configuration: Use INI file to define source paths, destination folder formats, and handle specific file types.
  • Concurrent Execution: Utilized multithreading for faster file copying.
  • Dry-run Mode: Preview the file organization without actually making changes.

Installation

  • Ensure you have Python 3.11.x installed
  • Install project via pip: pip install sdcopy

Usage

Configuration File

Example configuration for a Sony camera:

[RAW Photos]
path = DCIM/100MSDCF
destination = %Y-%m-%d/RAW Photos/

[Videos]
path = PRIVATE/M4ROOT/CLIP
destination = %Y-%m-%d/Videos/
  • path: Specifies the relative path within the source directory where files are located.
  • destination: Defines the destination folder structure using strftime format, like %Y-%m-%d, etc.

Command-line Options

Usage: sdcopy [OPTIONS] [SOURCE]... DEST

  • SOURCE: Source directory/directories from which files will be copied.
  • DEST: Destination directory where organized files will be copied. It accepts strftime format: %Y-%m-%d
  • -c, --config: Path to the configuration file (default: config.ini, ~/.sdcopy.ini).
  • --dry-run: Perform a trial run without making changes.
  • --threads: Number of concurrent thread for file copying (default: 4).

Example command: copying files into separate folders by file modified time and YYYY-MM-DD format

sdcopy /path/to/source /path/to/destination/%Y-%m-%d/ -c config.ini"

License

sdcopy is licensed under the MIT License. See the LICENSE file for details.

sdcopy's People

Contributors

kidig avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.