PHPackages                             mk-conn/structured-file-copy - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. mk-conn/structured-file-copy

ActiveLibrary[CLI &amp; Console](/categories/cli)

mk-conn/structured-file-copy
============================

A cli helper package to copy files from one source folder into a target folder in structured way.

1.1.3(4mo ago)013MITPHPPHP &gt;=8.4CI passing

Since Jun 8Pushed 3w ago1 watchersCompare

[ Source](https://github.com/mk-conn/structured-file-copy)[ Packagist](https://packagist.org/packages/mk-conn/structured-file-copy)[ RSS](/packages/mk-conn-structured-file-copy/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (6)Dependencies (11)Versions (14)Used By (0)

Copy and make it a structure
============================

[](#copy-and-make-it-a-structure)

A little cli helper to copy files from one source folder into a target folder structure

Why this in PHP and not just use given commandline linux/unix tools?
--------------------------------------------------------------------

[](#why-this-in-php-and-not-just-use-given-commandline-linuxunix-tools)

- Well... I prefer it like this: `sfc copy --include=type:image --sort=by:date:year,by:date:month` instead of `find -type | xargs... err what?.. err.. what was the next unix tool to pipe and filter files or types...? *sigh* Let's check Stack Overflow 😊`
- I primarily use it to copy photos and videos from my camera/phone into my local library, which I have sorted by year and month and file type.

How to use
----------

[](#how-to-use)

### Install

[](#install)

`composer global require "mk-conn/structured-file-copy"`

Or into a custom place of your choice:

`git clone https://github.com/mk-conn/structured-file-copy.git`

### Usage

[](#usage)

Composer is in your global path? Great! Just run

```
sfc copy --source=/source/folder --target=/target/folder --sort=by:date:year,by:date:month --include=type:image --exclude=ext:jpg,ext:png
```

Not?

```
~/.composer/vendor/bin/sfc copy --source=/source/folder --target=/target/folder --sort=by:date:year,by:date:month --include=type:image --exclude=ext:jpg,ext:png
```

Get help:

```
$ sfc copy --help
Description:
  Copies files from a source folder to a target folder in a structured way

Usage:
  copy [options]

Options:
      --source[=SOURCE]        The source folder (if not set, files are taken from the folder where the command is executed)
      --target=TARGET          The target folder where the files will be copied
      --sort[=SORT]            Sort by strategies: [by:default|by:letter|by:date:year|by:date:month|by:date:day|by:file:type].
                               E.g., if you want to sort by date (year) and then by by letter, you can use: --sort-by=by:date:year,by:letter.
                               This will create a folder for each year and then a folder for each letter.
                                [default: "by:default"]
  -i, --include[=INCLUDE]      Filter files by [ext,type]. E.g., --filter=ext:jpg,ext:png,ext:gif,ext:heic or --filter=type:image
                               Available types: [archive|audio|video|image|font|office|pdf|postscript|richtext|php|message|text|application|xml|source|config]
  -e, --exclude[=EXCLUDE]      Exclude files by [ext,type]. E.g., --exclude=jpg,png,gif or --exclude=type:image
                               Available types: [archive|audio|video|image|font|office|pdf|postscript|richtext|php|message|text|application|xml|source|config]
      --by-letter[=BY-LETTER]  When by:letter is used: Length of the first letters to group by [default: 1]
  -h, --help                   Display help for the given command. When no command is given display help for the list command
      --silent                 Do not output any message
  -q, --quiet                  Only errors are displayed. All other output is suppressed
  -V, --version                Display this application version
      --ansi|--no-ansi         Force (or disable --no-ansi) ANSI output
  -n, --no-interaction         Do not ask any interactive question
  -v|vv|vvv, --verbose         Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

```

TBD
---

[](#tbd)

- Add a dry run (just show what would be copied)
- Omit log at the end if not wanted

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance86

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 62.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~252 days

Recently: every ~87 days

Total

9

Last Release

145d ago

Major Versions

0.0.4 → 1.0.02025-01-05

PHP version history (3 changes)0.0.3PHP &gt;=7.3

1.0.0PHP &gt;=8.3

v1.1.2PHP &gt;=8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5840922?v=4)[Marko Krüger](/maintainers/mk-conn)[@mk-conn](https://github.com/mk-conn)

---

Top Contributors

[![mk-conn](https://avatars.githubusercontent.com/u/5840922?v=4)](https://github.com/mk-conn "mk-conn (38 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (23 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mk-conn-structured-file-copy/health.svg)

```
[![Health](https://phpackages.com/badges/mk-conn-structured-file-copy/health.svg)](https://phpackages.com/packages/mk-conn-structured-file-copy)
```

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[humbug/php-scoper

Prefixes all PHP namespaces in a file or directory.

7963.0M35](/packages/humbug-php-scoper)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
