Transfer random files from directory A to directory B.
Project description
fspachinko
Transfer random files from point A to point B. Customize what and how to transfer with various filters. Supports copy, move, symlink (shortcut), and hardlink transfer operations.
Installation (uv)
uv add fspachinko
or
uv tool install fspachinko
Usage
fspachinko can be used via command-line interface (CLI) or graphical user interface (GUI).
Command Line Interface
Basic Usage
# Use configuration file
fspachinko-cli --config your-fspachinko.json
Graphical User Interface
Launch GUI
fspachinko-gui
Or simply:
fspachinko
GUI Profiles
Save frequently used configurations as profiles:
- Configure settings in the GUI
- Click File → Save Profile As
- Name your profile (e.g., "music_copy")
- Load later with File → Load Profile
Configuration File
Create a fspachinko.json file for reusable configurations. Pass this to the CLI after the --config flag. The default (for Windows) is shown below:
{
"root": "C:/",
"dest": "fspachinko_output/",
"filecount": {
"count": 20,
"is_rand_enabled": false,
"rand_min": 1,
"rand_max": 12
},
"folder": {
"should_create": true,
"is_unique": true,
"name": "test_folder_output",
"count": 10
},
"filename": {
"template": "{original}"
},
"transfermode": {
"transfer_mode": "Symlink",
"trash_empty_folder_enabled": false
},
"keyword": {
"is_enabled": true,
"should_include": true,
"text": ""
},
"extension": {
"is_enabled": true,
"should_include": true,
"text": "wav"
},
"filesize": {
"is_enabled": false,
"minimum": 0.0,
"maximum": 0.0
},
"duration": {
"is_enabled": false,
"minimum": 0.0,
"maximum": 0.0
},
"folder_size_limit": {
"is_enabled": false,
"size_limit": 500.0
},
"total_size_limit": {
"is_enabled": false,
"size_limit": 500.0
},
"options": {
"max_per_folder": 3,
"should_follow_symlink": false,
"is_dry_run": true
}
}
Example Configurations
Random Music Playlist
{
"root": "~/Music",
"dest": "~/Playlists/Random",
"filecount": {
"count": 50,
...
},
...
"extension": {
"is_enabled": true,
"should_include": true,
"text": "wav,flac,m4a"
},
...
"options": {
"max_per_folder": 2,
...
}
}
Photo Gallery Selection
{
"root": "~/Photos",
"dest": "~/Gallery",
"filecount": {
"count": 20,
...
},
...
"extension": {
"is_enabled": true,
"should_include": true,
"text": "jpg,png"
},
"filesize": {
"is_enabled": true,
"is_enabled": true,
"minimum": 1.0,
...
},
"keyword": {
"should_include": false,
"text": "thumbnail,draft"
},
...
}
Video Highlights
{
"root": "~/Videos",
"dest": "~/Highlights",
"filecount": {
"count": 10,
...
},
...
"extension": {
"is_enabled": true,
"should_include": true,
"text": "mp4"
},
"duration": {
"is_enabled": true,
"minimum": 30.0,
"maximum": 600.0
},
...
}
Safe Preview (Dry Run)
{
"root": "/important/files",
"dest": "/backup",
"filecount": {
"count": 100,
...
},
...
"options": {
...
"is_dry_run": true
}
}
Advanced Features
Output Filename Templates
Use template variables in filenames:
{original}: Original filename{index}: Sequential number{date}: Current date (YYYY-MM-DD){time}: Current time (HH-MM-SS){datetime}: Combined date and time{parent}: Parent folder name{parentstoroot}: Full parent path separated by-
Example: {index}_{original}_{date}: photo.jpg -> 1_photo_2026-01-25.jpg
Logging
Configure logging in a json file. Here is the default fspachinko_configs/logging.json provided:
{
"version": 1,
"disable_existing_loggers": false,
"formatters": {
"file": {
"format": "[%(asctime)s] %(levelname)s[%(module)s] %(message)s"
},
"console": {
"format": "[%(asctime)s] %(levelname)s[%(module)s] %(message)s"
}
},
"handlers": {
"console": {
"class": "logging.StreamHandler",
"formatter": "console",
"level": "INFO",
"stream": "ext://sys.stdout"
},
"file": {
"class": "logging.FileHandler",
"formatter": "file",
"level": "DEBUG",
"filename": "fspachinko.log",
"mode": "w",
"encoding": "utf-8",
"delay": true
}
},
"root": {
"level": "DEBUG",
"handlers": [
"console",
"file"
]
}
}
Troubleshooting
Common Issues
No files found:
- Check your filters (extension, keyword, size)
- Verify source path exists and contains matching files
- Try
--dry-runto see what would be selected
Permission errors:
- Ensure read access to source directory
- Ensure write access to destination directory
- Try running with appropriate permissions
Hardlink errors:
- Source and destination must be on same filesystem
- Not supported on all filesystems (e.g., FAT32)
- Falls back to symlink automatically
Duration filter not working:
- Requires ffmpeg installed on system
- Only works with media files (video/audio)
- Check file format is supported by ffmpeg
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fspachinko-0.0.2.tar.gz.
File metadata
- Download URL: fspachinko-0.0.2.tar.gz
- Upload date:
- Size: 164.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36ace5a5b8b597a507c4293d7b717d161f770dd59bbb7a240885962eefc3cb6a
|
|
| MD5 |
5aa38159d7e9480cf205ea67ab6a129e
|
|
| BLAKE2b-256 |
289248627c185d4e898c0a6f4507b1497a2717b0f6f65daee84a1194a26836f3
|
File details
Details for the file fspachinko-0.0.2-py3-none-any.whl.
File metadata
- Download URL: fspachinko-0.0.2-py3-none-any.whl
- Upload date:
- Size: 178.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a2d87b03366560c9ff82c703c0d7c039504973127e528f656c0a5b2b9633e84
|
|
| MD5 |
e54c3229d524018df1cbbdf8c0528f94
|
|
| BLAKE2b-256 |
f061e0854befb7c9c7932c191fc9803d1cdd7e3251fdeaf3e527433b1755c5d7
|