|The stupid question is the question not asked|
Renaming all files in a directoryby Aldebaran (Curate)
|on Feb 02, 2021 at 03:17 UTC||Need Help??|
I'm so relieved to be back at my keyboard, with a roof over my head, fridge full of food, and plentiful water of varied temperature. I was feeling kind of stuck because I had a repository that I had downloaded that didn't have the proper credentials, and it was preventing updating. I got that all cleared away, so now I have:
One of the first things I'll do is create a webpage describing the trip, and that is going to require that a bunch of odd images gets herded to the net, with an exact number of corresponding captions. For this task, I find that I can really economize on GUI events with perl and a little skill on the command line.
But I'm one of those guys who would make every mistake in the book if I started at square one. I know that I had a thread some time back called renaming all files in a directory. I tried to search for this with keywords but had to resort to scrolling through my writeups back to 2012. I was gonna complain that the search didn't work. However, I had searched for the word 'rename' not 'renaming', and I realize that the problem is not with the software.
I tried one of the answers I hadn't used before:
That command didn't work at first, but I could get my way to one that did because what exists between single quotations is lexical perl that I understand. And gosh, I've been pretty diligent about studying this including taking in Util's talk at 2020 perl conference, which helped me understand how people "get there on the command line."
Another modification gets my captions looking all uniform, so I know I've got a bijection going:
Now I know that my data will be well-conditioned for use by other scripts to get it onto the net.
This was just my day in having perl making something easier....