public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Dale <rdalek1967@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Renaming files with those pesky picture type characters.
Date: Tue, 29 Oct 2024 11:18:21 -0500	[thread overview]
Message-ID: <2d8f86e2-923a-cc81-e56d-63135b379737@gmail.com> (raw)
In-Reply-To: <4973073.31r3eYUQgx@rogueboard>

Michael wrote:
> On Tuesday 29 October 2024 15:18:40 GMT Dale wrote:
>> Howdy,
>>
>> I downloaded some files.  I have a few that have some weird names.  Some
>> have those picture type characters.  Some start with a dash, "-".  In
>> some cases I can use wild cards to change them.  Frank gave me some
>> ideas on that off list, while discussing his nifty checksum tool. 
>> Anyway, I ran up on a few that start with a dash, "-", and I can't find
>> a way around that.  The mv command thinks it is me trying to include a
>> option.  It spits out something like this. 
>>
>>
>> mv: unrecognized option '---ne.avi'
>>
>>
>> Some of the other characters I run into look like this. 
>>
>>
>> ����
>>
>>
>> Those I can usually get around with wildcards.  I have not found a way
>> to get around the ones with the dash in front tho.  I tried a single
>> quote, double quote etc but still no worky.  Also, tab completion
>> doesn't help either. 
>>
>> One reason I want to change these, it makes Frank's script puke on my
>> keyboard.  It reacts the same way with Franks script as it does when I
>> try to use cp or mv.  Why someone would name files that way is beyond me. 
>>
>> What is the trick to rename these files?  I've tried mv, Dolphin,
>> Krusader and such.  There has to be a way but I can't figure out what it
>> is.  Heck, I'm not even sure what to search for to find out how to do
>> this. 
>>
>> Thanks. 
>>
>> Dale
>>
>> :-)  :-) 
> In a terminal running bash you can try:
>
> mv ./-ne.avi newname.avi
>
> or use a double dash to indicate end of options for the preceding command:
>
> mv -- -ne.avi newname.avi
>
> For a GUI-fied application, you can use 'kde-misc/krename'.


Now that is awesome.  The first one works great.  Haven't had the need
to try others yet but figure they would work too.  Finally, I can rename
these files with weird characters.  I never knew a -- meant end of
options before.  Been using Linux for a couple decades and never saw
that info. 

Krename is a tool I use a LOT.  Kinda overkill for this.  It seems
whoever decided to use those characters in file names tends to only put
one or two in a directory.  Usually when I use Krename, I am processing
a lot of files.  Sometimes I'll process 200 files or more.  Awesome tool
tho.  I just use it when it is faster than renaming manually. 

Thanks much. 

Dale

:-)  :-) 

P. S.  Anyone storing files long term, you should really consider using
Franks script.  It is a really neat tool. 


  reply	other threads:[~2024-10-29 16:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-29 15:18 [gentoo-user] Renaming files with those pesky picture type characters Dale
2024-10-29 15:47 ` Michael
2024-10-29 16:18   ` Dale [this message]
2024-10-29 16:40     ` Michael
2024-10-29 18:05       ` Dale
2024-10-30  3:05         ` Eli Schwartz
2024-10-30 17:25           ` Dale
2024-11-01  2:25 ` Andrew Lowe
2024-11-01 14:16   ` Jack Ostroff
2024-11-01 16:02     ` Dale
2024-11-03 23:52 ` Wol

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2d8f86e2-923a-cc81-e56d-63135b379737@gmail.com \
    --to=rdalek1967@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox