MoreRSS

site iconThomas RigbyModify

A Gen-X/Millennial cusp (Xennial), currently a creative technologist at Havas Lynx Group.
Please copy the RSS to your reader, or quickly subscribe to:

Inoreader Feedly Follow Feedbin Local Reader

Rss preview of Blog of Thomas Rigby

Renaming all files in a folder using the folder name

2026-07-20 15:27:15

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 skip it — no accidental folder renaming.

$(basename "$PWD") grabs just the name of the current folder (not the full path), which is what gets used as the prefix.

mv -- "$f" "…" does the actual rename, tacking the folder name onto the front of the original filename. The -- is a little bit of insurance — it tells mv "everything after this is a filename, not a flag," which saves you if you ever end up with a scan named something silly like -000001.JPG.

Now, when I've extracted my scans, I quickly rename the folder mv ThomasRigby036944 "Minolta SRT303 2026-07-09", cd into it and run mvff to get meaningful filenames in a fraction of a second.

Minolta SRT303 2026-07-09/
├── Minolta SRT303 2026-07-09-000001.JPG
├── Minolta SRT303 2026-07-09-000007.JPG
├── Minolta SRT303 2026-07-09-000008.JPG
├── Minolta SRT303 2026-07-09-000009.JPG
...
└── Minolta SRT303 2026-07-09-000030.JPG

A note for future-me: run it twice (on purpose or, likely, by accident) and you'll get double prefixes, since it doesn't check whether the name's already there. I could add a check in but that's overkill for this use, I think; the function is supposed to be quick and dumb but effective.

Another side note: This is also possible using the "bulk rename" capability in MacOS Finder and Nemo (which I use on Linux Mint). But the terminal is, in many ways, quicker and more intuitive.

I hope you find this useful!


Thanks for reading this post via RSS! Let me know your thoughts by sending me an email: [email protected].

Weeknotes: 2026-W29

2026-07-20 04:29:00

13th July - 19th July

a moody sky of competing clouds over a horizon of English countryside trees with a pylon between the two; the cables spreading out from the distant pylon towards the camera like textbook leading lines getting lost in the grain and cloud patterns
#SilentSunday

Back in September last year, my faithful Kobo Nia died on me. I started a firmware update, fell asleep, and woke up to a boot-looping brick. I picked up my wife's ancient Kindle and have been limping through the last 11 months on that. I even wrote about e-ink being incredible technology off the back of that (and it really is) but what I've been missing is the backlight, which is an odd thing to miss but I do a lot of reading in bed and would rather do it with the light off, so as not to disturb anyone else.

So I've been trying, on and off, to restore the Nia, with basically zero progress in those 11 months. Eventually I decided to just contact Kobo support and ask them for a clean ISO disc image I could flash onto it, to get it working completely from scratch with a factory reset. They said they don't do that and wouldn't be able to provide it — however, even though my device is seven years old and long out of warranty, because it happened while I was installing firmware, they were happy to send me a replacement free of charge.

So I saved myself about £80 just by getting in touch with them! They gave me a free postage label, which I printed off, stuck on an old Jiffy bag, and chucked in a post box. I'm expecting to get my replacement in the next seven to ten days, according to their customer service team. That's a definite bonus to the week.


Something else I'm quite excited about: I decided to YOLO it and get the "Inseparable Pen" from Yanko Design. My wife shared a link to it a few months ago, and even though I'm very happy with my cheapy Titanium bolt action pen for the notebook in my back pocket, the Inseparable's design is way cooler and would be ideal for my work notebook. I found a reliable supply of refills — it takes a standard refill, sadly not the same standard as my Titanium bolt-action, but still affordable.


Following last week's delivery of the changes to the website, and the inevitable post-launch updates, changes had to be made to the implementation guidance.

The website is due to be packaged up and delivered to a variety of partner markets, who will be installing and managing it themselves with no oversight from the central team. Everything they need to do needs to be clearly documented, and I've been pulling that together — which has been tricky as some of the tutorials had to be written prior to some of the development; given the scale, we needed run in parallel rather than after successful deployment.

That said, it's now done, and the client is extremely happy with the result — always nice to hear. We're now teeing up a few hours of one-on-one training with some of the key partner markets to get these projects deployed. Exciting times ahead, expanding outside of Europe.


The misery was a grey river, dragging me over and under and through a life so quickly that I only caught glimpses of it.
Bridget Collins, "The Binding"


Links of Interest™


Thanks for reading this post via RSS! Let me know your thoughts by sending me an email: [email protected].

New and new-to-me music 2026-W29

2026-07-18 13:31:10

Billed as Neo Dolly Parton melodic noise stark punk and post-punk soundscapes by my old mate John Robb1, Molly Vulpyne and her band rattle through a number of sleazy punky numbers that are pretty good but I probably need to sit with them a bit longer. "UR A FAD X" has shades of early Soundgarden mixed with "The Spaghetti Incident?".


I bought "Back Down" by defunct Dublin "Diet Punk" band, Katy's Party, based solely on the opening riff to "Clement's Time". I could easily see them as a support act for Los Campesinos.


Is it a cliche to say Canadian synthpop is "icy"? Probably, but that's what you get with Leathers. The brainchild of visual artist, Shannon Hemmett, hits somewhere between a more unhinged Ladytron and a less unhinged Lebanon Hanover. "High Rise" is ace; the style of music genuinely suits the dispassionate lyrics about life in a bland apartment. The principle of elevating the mundane to art by virtue of observation in full effect there.


Despite the assertion The Field Mice were restlessly reinventing themselves and their sound not just with every release, but sometimes on opposite sides of the same piece of vinyl2, their output doesn't stray too far from the lush jangly indie sound that was popular at the time. It's lovely though; Bobby Wratten's voice is clear and melancholy without descending into a Morrissey pastiche and is beautifully countered by Anne Mari Davies' cut crystal vocals. "Where'd You Learn To Kiss That Way?" is a 36 track compilation of practically everything they released in their career — for a mere £14 over on Bandcamp!


Last minute entry this week, Sygh are a Dublin three-piece peddling "alternative rock" that's shoegaze-y without being impenetrable, rocking without being bombastic, and emotional without being overblown. This corvid-lover is going to recommend "Magpie" — a mid-album banger dripping with 90s grunge nostalgia.


1: He used to cycle past my house every day

2: Source: Bandcamp


Thanks for reading this post via RSS! Let me know your thoughts by sending me an email: [email protected].

Weeknotes: 2026-W28

2026-07-12 08:00:00

6th July - 12th July

the pale yellow sun is a defined weak circle in a lemon chiffon sky over a fresh mown field surrounded by hedge of brambles with a telegraph pole and wires providing an industrial counterpoint

Thick morning fog completely hides the hills on the horizon. smudging the yolk-gold sun like it's trying to erase it from the sky but, instead, spreads it across the firmament like butter. It feels like a dream.


Not entirely sure what possessed us to take a day trip by public transport during a UK heatwave but we did and, not only did no-one die, it was genuinely pleasurable; much better than hoofing up the awful A-Roads in the car. Perhaps we can work up to an inter-railing holiday. Perhaps.


They say (something along the lines of) "there is no better spell checker than the publish button" and, following this week's big deployment, I'd begrudgingly agree.

Quite a few things could have been more perfect but, importantly, the client is very happy. Several many learnings for ways of working in future; mostly around robust documentation and structured communications. Mostly.


Like a frog in boiling water, I didn't quite appreciate how loud the old washing machine had got until the new one was running. Silence has a sound.


Links of Interest™


Thanks for reading this post via RSS! Let me know your thoughts by sending me an email: [email protected].

New and new-to-me music 2026-W28

2026-07-10 15:38:59

Listening to AA Williams and feeling blown away. Gothic dark rock music. A slick and polished wall of bassy distorted guitars, solid drums, and plaintive piano leaving room for Williams' vocals that sit in that Tori Amos space. At times sweeping and epic, others painfully introspective — sometimes both in the same song. Try "Wolves" for a taste of what I mean.


Kiki Rockwell's "Faery Queen" (can't fault that old-timey spelling) is genuinely unsettling. The sequel to Faery King from "Eldest Daughter of an Eldest Daughter" brings muffled drums breaking into a Middle Eastern melody, the tempo shift with those *gasp* and WAIT! interjections that are a trademark at this point. And, oh lordy!, the rattle on the bass strings 😍


One of my favourite things with Bandcamp is "stacking" preferences to find obscure combinations. Which is how I discovered Irish Black Metal. Especially Primordial — a deliciously over-dramatic take on the genre. Imagine Gary Moore's black metal band covering Iron Maiden with Dick Valentine on vocals, that's "To Hell or the Hangman".


Thanks for reading this post via RSS! Let me know your thoughts by sending me an email: [email protected].

Quoting Matt Gemmell on interface design

2026-07-10 02:57:17

Interface designers must have the same maxim as doctors: primum non nocere
Matt Gemmell

Time after time we hear the same stories; companies shipping radical new UI that alienates stalwart users, "Google changed Gmail and now my mum can't find anything", MacOS Tahoe.

While it's true that no-one ever got promoted for tackling technical debt, at some point surely someone has to take a stand against the mindless rabid pursuit of "line goes up at all costs"?

Then again… * side-eyes Copilot *


Thanks for reading this post via RSS! Let me know your thoughts by sending me an email: [email protected].