fmove

command module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2024 License: MIT Imports: 4 Imported by: 0

README

fmove

Action Report Card Lines of code godoc License

xuender/fmove is a file move tool. It can move files and directories.

🚀 Install

go install github.com/xuender/fmove@latest

💡 Usage

mkdir demo
cd demo

cat <<EOF > fm.toml
[[target]]
path = "Images"
condition = "type==image"
subDir = "yy"

[[target]]
path = "Videos"
condition = "type==video"
subDir = "yy+'-'+MM"
EOF

cp ../* .
fmove
fm.toml

Move jpeg files to directory target/24/06.

[[target]]
path = "target"
condition = "type==image && sub=='jpeg'"
subDir = "yy+'/'+MM"
Meta
Keyword Description Example
type File type, such as image, video, audio, archive. image
subtype File suffix, such as jpeg, mp4, mp3, zip. jpeg
sub alias for subtype jpeg
extension File extension, such as .jpg, .mp4, .mp3, .zip .jpg
ext alias for extension .jpg
size File size, unit is byte. 1024
width Image or Video width, unit is pixel. 1920
height Image or Video height, unit is pixel. 1080
duration Video or Audio duration, unit is second. 60
dur alias for duration 60
channels Audio or Video channels, 1 or 2. 2
chan alias for channels 2
Datetime
Keyword Description Example
yyyy Full four-digit year 2024
yy Abbreviated two-digit year 24
MM Month, two digits with leading zeros 06
M Month, one digit 6
dd Day of the month, two digits with leading zeros 13
d Day of the month, one digit 13
HH Hour in 24-hour, two digits with leading zeros 16
H Hour in 24-hour, one digit 16
hh Hour in 12-hour, two digits with leading zeros 04
h Hour in 12-hour, one digit 4
mm Minute, two digits with leading zeros 30
m Minute, one digit 30
ss Second, two digits with leading zeros 45
s Second, one digit 45

👤 Contributors

Contributors

📝 License

© ender, 2024~time.Now

MIT LICENSE

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL