[nSLUG] Removing spaces from file names - note, long lines

Oliver Doepner odoepner at gmail.com
Tue Nov 11 17:55:30 AST 2014


Regarding moving photo files, I use a script that utilizes exiftool to
determine year and month the photo (or video) was taken and moves it to a
yyyy/mm folder:

https://odoepner.wordpress.com/2014/01/11/organize-image-and-video-files-by-creation-date-with-exiftool/


On Tue, Nov 11, 2014 at 3:51 AM, Mike Spencer <mspencer at tallships.ca> wrote:

>
> Stephen Gregory <nslug at kernelpanic.ca> wrote:
>
> > As it is a perl regex you can do just about anything provided you
> > don't mind opening a portal to the realm of the elder gods.
>
> Gestorben ist nicht , was fur ewig ruht und mit unbekannten
> Aoenen, mog sogar der Tod nach stirben.
>
> > For those of you who like perl...
>
> I love to hate perl.  It has something like pointers that don't and
> something like lisp lists that aren't.  But it has whiz-bang regexps.
>
> My most ambitous effort is a cgi-bin script on localhost that reads
> the $QUERY_STRING from my browser, opens a socket on a particular www
> server, makes a request, unpacks the chunked delivery and re-writes
> several categories of URLs either to eliminate forwarding or to cause
> them to point back to the script itself. And replaces RFC
> 2396-reserved characters with %xx escapes and undoes some %xx that are
> screwed up.  Work in progress, a few little details to fix yet.  Good
> workout for regex.  Use it every day.
>
> Another fun exercise was figuring out a regex that would match
> dotted-quad IP addresses in mail headers where something like
> 125.12.125.259 may appear that isn't an address.  May require the Perl
> "look-ahead" regex hack.
>
> As for renaming files, I often end up with a bunch of image files
> named something like image0065.jpg, image0066.jpg etc.  It's uaually
> easy to just manually do something like:
>
>    foreach foo (image*)
>      mv $foo `echo $foo | sed -e 's/image00/party-aug-2014-/'`
>    end
>
> (From which you can tell that I'm a csh user. I can use bash but I'm a
> little weak on it.)
>
>
> FWIW,
> - Mike
>
> --
> Michael Spencer                  Nova Scotia, Canada       .~.
>                                                            /V\
> mspencer at tallships.ca                                     /( )\
> http://home.tallships.ca/mspencer/                        ^^-^^
> _______________________________________________
> nSLUG mailing list
> nSLUG at nslug.ns.ca
> http://nslug.ns.ca/mailman/listinfo/nslug
>



-- 
Oliver Doepner
Software Engineer
http://oliver.doepner.net/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nslug.ns.ca/pipermail/nslug/attachments/20141111/28b4ea4a/attachment.html>


More information about the nSLUG mailing list