gcmd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gcmd-usr] Bulk rename - using a wild card?


From: kht-lists
Subject: Re: [gcmd-usr] Bulk rename - using a wild card?
Date: Tue, 18 Sep 2018 18:46:18 +0000

Thanks Michael,

g-c worked well for most words. I was able to put all of my change rules into 
g-c and then do one directory after another with the whole batch of changes. 
The problem with "The" was the biggest pain. The folder of file names starting 
with 3 numbers (The Croyd collection if you are a Usenet denzian) was one 
example. The other case was naming like "Sherlock Holmes - The Case of the 
Speckled Band". When "The" follows "- " I do not want to change the case of the 
T.  I have some cleanup to do where I have a .avi and a .mkv version of the 
same film. I have a FoxPro program which will find file name dupes. I guess I 
could have it look for these sort of inconsistencies as well - or even write a 
script to fix the errors.

Not sure I have enough movies to make that worth while.  The last time I did 
something like that I was moving about 80K engineering documents from a server 
where they were sort of collected in directories by engineering project number 
to a more formal document management system. I dumped a directory listing to a 
file, parsed it and applied a BUNCH of rules specified by the client. I wrote 
out the scripts to move the documents to the new server, rename as needed, 
record them in the document management database etc. Just as a CYA I ran an 
md5sum on each document where it originally lived and as it was originally 
named.  I did the same with the final result and built a cross reference 
between the old and new - in case someone said their file had been lost :-)

Back to g-c on the other hand. I guess it is NOT possible to make a "Search 
for" condition containing a wild card and then replace only part of the "Search 
for" string with the desired change. Am I correct?

Thanks again,

Ken


Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Tuesday, September 18, 2018 12:32 PM, Michael <address@hidden> wrote:

> My quickshot, suitable only for that specific case, would be 'The' -> 'the' 
> and then 'the H' -> 'The H'
>
> For more sphisticated solutions, if you are familiar with 'sed', you could 
> try out the commandline tool 'rename'.
>
> Package: rename
> Priority: standard
> Section: perl
> Maintainer: Debian Perl Group address@hidden
> Architecture: all
> Multi-Arch: foreign
> Version: 1.00-1
> Description: Perl extension for renaming multiple files
> This package provides both a perl interface for renaming files
> (File::Rename) and a command line tool 'rename' which is intended to
> replace the version currently supplied by the perl package.
> Homepage: https://metacpan.org/release/File-Rename
>
> The huge advantage over gcmd is that it works recursively (or at least i 
> think it does).
>
> Recursive renaming was one thing of the gcmd To Do list from very early days, 
> but never got implemented.
>
> hth mi
>
> > Hello from waterlogged North Carolina,
>
> Be thankful -- too much water is better than no water at all.
>
> > p.s. The sky is starting to become bright. I wonder if the Martians are 
> > invading?
>
> They are already there since 1492 ... so what.
>
> gcmd-users mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/gcmd-users





reply via email to

[Prev in Thread] Current Thread [Next in Thread]