127 days ago · Tech · hide · Fediverse post

I find myself doing this every month so I find myself Googling this every month so, in the spirit of "write about it so you never forget it", I decided to write it down. And, who knows, it might be useful for you too. When I get my photography scans back from the lab they arrive named with a sequential number that is neat but useless. ThomasRigb036944├── 000001.JPG├── 000007.JPG├── 000008.JPG...└── 000030.JPG The associated Field Notes all have a standard naming convention of "Camera Name plus ISO Date": Minolta SRT303 2026-07-09. When I share my images on my website, the original file is copied into the repo which results in even less helpful files names like 000001 (4).JPG. So, I have added this function into my .bash_functions file (remembering, naturally, to source ~/.bashrc!) mvff() { for f in *; do [ -f "$f" ] && mv -- "$f" "$(basename "$PWD")-$f" done} [ -f "$f" ] checks that we're actually looking at a file, not a directory. If it's not a file, the && short-circuits and we…

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town