All Projects → anhsirk0 → file-arranger

anhsirk0 / file-arranger

Licence: GPL-3.0 license
Simple & capable Directory arranger/cleaner

Programming Languages

perl
6916 projects
shell
77523 projects

Projects that are alternatives of or similar to file-arranger

Mksh
MirBSD Korn Shell Source Code Mirror – This is a publish-only repository and all pull requests are ignored. This repository is a mirror and may receive forced (non-fast-forward) updates. Please contribute to the CVS repository of The MirOS Project instead.
Stars: ✭ 130 (+140.74%)
Mutual labels:  bsd
Stretchly
The break time reminder app
Stars: ✭ 2,958 (+5377.78%)
Mutual labels:  bsd
Hackintosh-ASUS-A455LF-Notebook
EFI Folder for ASUS A455LF-WX039D Notebook Series with Clover/OpenCore Legacy or UEFI
Stars: ✭ 27 (-50%)
Mutual labels:  bsd
Oksh
Portable OpenBSD ksh, based on the Public Domain Korn Shell (pdksh).
Stars: ✭ 142 (+162.96%)
Mutual labels:  bsd
Htop
htop - an interactive process viewer
Stars: ✭ 3,076 (+5596.3%)
Mutual labels:  bsd
Tmux Cpu
Plug and play cpu percentage and icon indicator for Tmux.
Stars: ✭ 238 (+340.74%)
Mutual labels:  bsd
Cats
Implementations of cat(1) from various sources.
Stars: ✭ 125 (+131.48%)
Mutual labels:  bsd
InitWare
The InitWare Suite of Middleware allows you to manage services and system resources as logical entities called units. Its main component is a service management ("init") system.
Stars: ✭ 164 (+203.7%)
Mutual labels:  bsd
Libagar
Cross-Platform GUI Toolkit (stable)
Stars: ✭ 212 (+292.59%)
Mutual labels:  bsd
Ensembles
A digital arranger workstation powered by FluidSynth
Stars: ✭ 312 (+477.78%)
Mutual labels:  arranger
Pimd
PIM-SM/SSM multicast routing for UNIX
Stars: ✭ 143 (+164.81%)
Mutual labels:  bsd
Azpainter
Full color painting software for Unix-like systems for illustration drawing. This is un-official little fixed repository for package maintainers of image editor AzPainter (based on "mlib" toolkit). Official repository - http://azsky2.html.xdomain.jp/arc/download.html
Stars: ✭ 179 (+231.48%)
Mutual labels:  bsd
Cups
OpenPrinting CUPS Sources
Stars: ✭ 253 (+368.52%)
Mutual labels:  bsd
Smcroute
Static multicast routing for UNIX
Stars: ✭ 140 (+159.26%)
Mutual labels:  bsd
bf256
Brainfuck compiler under 256 bytes in size.
Stars: ✭ 21 (-61.11%)
Mutual labels:  bsd
Bchs
source code for BCHS website
Stars: ✭ 126 (+133.33%)
Mutual labels:  bsd
Awesome Bsd
A collection of awesome BSD related stuff
Stars: ✭ 236 (+337.04%)
Mutual labels:  bsd
bsdhwmon
Hardware sensor monitoring utility for FreeBSD
Stars: ✭ 16 (-70.37%)
Mutual labels:  bsd
i3lock-color
The world's most popular non-default computer lockscreen.
Stars: ✭ 904 (+1574.07%)
Mutual labels:  bsd
go-sysconf
sysconf for Go, without using cgo
Stars: ✭ 119 (+120.37%)
Mutual labels:  bsd

arng

Simple & Capable files arranger (previously arranger)

About

Arng is a CLI file arng written in Perl
It cleans up your Directory by moving files to their corresponding Directory by their file extension
jpg, png, jpeg, webp -> Images
mp4, mkv, avi, flv -> Videos
and other common filetype extensions

Features

Arng can

  • control maxdepth when arranging
  • delete empty Directories
  • save logs of what exactly happened
  • revert the move using logfile
  • move only specific files by provided file extensions & Directory
  • arrange more than one Directory
  • move unrecognised filetypes to 'Other' Directory
  • arrange files by patterns

Installation

Its just a perl script download it make it executable and put somewhere in your $PATH

Via install script

bash -c "$(curl https://raw.githubusercontent.com/anhsirk0/file-arranger/master/install.sh)"

Manually

with wget

wget https://raw.githubusercontent.com/anhsirk0/file-arranger/master/arng.pl -O arng

or

with curl

curl https://raw.githubusercontent.com/anhsirk0/file-arranger/master/arng.pl --output arng

making it executable

chmod +x arng

copying it to $PATH (~/.local/bin/ , this step is optional)

cp arng ~/.local/bin/

Usage

arng [dirs] [options]

dry-run

$ arng -dry
files2.mp4 -> Videos/files2.mp4
files2.mp3 -> Music/files2.mp3
files1.mp4 -> Videos/files1.mp4
files2.pl -> Other/files2.pl
files1.mp3 -> Music/files1.mp3
files1.pdf -> Documents/files1.pdf
files1.pl -> Other/files1.pl
files2.pdf -> Documents/files2.pdf
0 Files moved

adding verbose

$ arng -v
files2.mp4 -> Videos/files2.mp4
files2.mp3 -> Music/files2.mp3
files1.mp4 -> Videos/files1.mp4
files2.pl -> Other/files2.pl
files1.mp3 -> Music/files1.mp3
files1.pdf -> Documents/files1.pdf
files1.pl -> Other/files1.pl
files2.pdf -> Documents/files2.pdf
8 Files moved

moving files by extensions to provided dir

$ arng -ext sh zsh fish -dir shell -v
script.sh -> shell/script.sh
script.zsh -> shell/script.zsh
script.fish -> shell/script.fish
3 Files moved

reversing the move via a logfile

logfiles are stored in ~/.config/arng/logs

$ arng -rev "~/.config/arng/logs/logfile1234"
8 files moved

not saving logs and not moving unrecognised filetypes to 'Other'

$ arng -nl -nu
8 files moved

or

$ arng --no-log --no-unknown
8 files moved

deleting empty directories

$ arng --delete-empty --no-arrange
2 Directory deleted
0 files moved

or

$ arng -de -na
2 Directory deleted
0 files moved

name/iname

$ arng -iname "episode*" -dir "Episodes" -v
episode_1.mp4 -> Episodes/episode_1.mp4
EPISODE_3.mp4 -> Episodes/EPISODE_3.mp4
episode_2.mp4 -> Episodes/episode_2.mp4
EPISODE_4.mp4 -> Episodes/EPISODE_4.mp4
4 Files moved

maxdepth

$ tree
.
└── dir
    ├── subdir1
    │   ├── subdir1_file.mp3
    │   ├── subdir1_file.mp4
    │   └── subdir1_file.pdf
    └── subdir2
        ├── subdir2_file.mp3
        ├── subdir2_file.mp4
        └── subdir2_file.pdf

3 directories, 6 files
$ arng
0 files moved
$ arng --maxdepth 3 -v
dir/subdir2/subdir2_file.mp4 -> Videos/subdir2_file.mp4
dir/subdir2/subdir2_file.pdf -> Documents/subdir2_file.pdf
dir/subdir2/subdir2_file.mp3 -> Music/subdir2_file.mp3
dir/subdir1/subdir1_file.mp4 -> Videos/subdir1_file.mp4
dir/subdir1/subdir1_file.pdf -> Documents/subdir1_file.pdf
dir/subdir1/subdir1_file.mp3 -> Music/subdir1_file.mp3
6 Files moved

Tweaking arng via config file

you need to create a file ~/.config/arng/arng.conf

you can download the sample config file and move it into the config Directory

wget https://raw.githubusercontent.com/anhsirk0/file-arranger/master/arng.conf

or

with curl

curl https://raw.githubusercontent.com/anhsirk0/file-arranger/master/arng.conf --output arng.conf

move to config dir

mv arng.conf ~/.config/arng/arng.conf

About config file

  • everything should be space separated (don't worry about extra/trailing spaces)
  • first word of line would be Directory name rest would be file extensions associated with that Directory
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].