From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RVwhk-0002G6-2S for garchives@archives.gentoo.org; Thu, 01 Dec 2011 02:48:56 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 68C1021C12F; Thu, 1 Dec 2011 02:48:27 +0000 (UTC) Received: from mail-yw0-f53.google.com (mail-yw0-f53.google.com [209.85.213.53]) by pigeon.gentoo.org (Postfix) with ESMTP id 8F2CC21C023 for ; Thu, 1 Dec 2011 02:46:52 +0000 (UTC) Received: by ywm19 with SMTP id 19so1723357ywm.40 for ; Wed, 30 Nov 2011 18:46:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=ZDj1H8KCfr5i+5J9HrNuZ6vRS3gNwfoJIUrecnezpWI=; b=XuQVfyz9H46xCHoAkiPbahsUbZjqEDwpaHYnusvPWpNUZZcdQ2FBb6/BvfAm5U+0/i eEy7quJ7pAm+gKzGErNQvQ/YHOoG9m/nXtAnfEqenDSrqXjGBbf9et1MVVdHbBwX/J80 q106cVizkKSs03CQe7sFhPN6tPZwiYbNgEjHI= Received: by 10.236.201.137 with SMTP id b9mr8234296yho.124.1322707612096; Wed, 30 Nov 2011 18:46:52 -0800 (PST) Received: from [192.168.2.5] (adsl-98-95-128-85.jan.bellsouth.net. [98.95.128.85]) by mx.google.com with ESMTPS id b9sm11133287anb.7.2011.11.30.18.46.50 (version=SSLv3 cipher=OTHER); Wed, 30 Nov 2011 18:46:51 -0800 (PST) Message-ID: <4ED6EA99.3050009@gmail.com> Date: Wed, 30 Nov 2011 20:46:49 -0600 From: Dale User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20111022 Firefox/7.0.1 SeaMonkey/2.4.1 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Changing names of LOTS of files, adding to them actually. References: <4ED6DD26.1070604@gmail.com> <20111201021821.GD23374@eisen.lan> In-Reply-To: <20111201021821.GD23374@eisen.lan> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 9b0b2b0c-a403-4c56-8f21-b7d9959c5ccb X-Archives-Hash: 0d85e543df54f17e9690664b4c370bf3 Frank Steinmetzger wrote: > On Wed, Nov 30, 2011 at 07:49:26PM -0600, Dale wrote: > >> I ran into a problem. I been downloading a lot of TV shows. I forgot >> to put a sort of important part in the names. This is what I have wit= h >> the full path: >> >> /data/Movies/TV_Series/Person of Interest/Season 1, Episode 1 - Pilot.= mp4 >> >> This is what I need it to be: >> >> /data/Movies/TV_Series/Person of Interest/Person of Interest - Season = 1, >> Episode 1 - Pilot.mp4 >> >> Basically, I need to add the name of the show to the name of the file. >> They will all be added to the front of the names. They also almost al= l >> contain spaces, which means some fancy footwork with the \. >> >> Is there a way to do this? I have room to copy them to another >> directory if needed. I would sort of actually prefer it that way sinc= e >> if it messes up, I got the originals at least. >> >> Sorry I'm not real good at gawk, sed and all those things. I suspect >> those will be used tho. I am familiar with | and grep tho. ;-) >> >> Thoughts? > I can=E2=80=99t remember right now what graphical environment you use, = but for KDE > there is KRename. But if you want it quick and efficient, I suggest > renameutils. You give it a list of files and it opens $EDITOR containin= g two > columns with the list. The first is the old name, and in the second you= can > enter the new name. > > It=E2=80=99s basically a mass renamer for the console, powered by your = favorite > features of your favorite editor. With the recursive flag -R you can ev= en do > what you want for many dirs at once and then insert the Series name usi= ng > search and replace with regular expressions. > > But your particular example could be done simply with: > > cd "/data/Movies/TV_Series/Person of Interest" > for i in *.mp4; do mv -n "$i" "Person of Interest - $i"; done Oh heck yea. Krename did a wonderful job. It renamed them in place. I=20 tested it on a small directory with just a few files at first. This is=20 cool. I didn't know KDE had this and it wasn't installed either. No grep, gawk or sed in the command line for this? Wow. I thought=20 there would be at least a couple of those in there. lol Thanks for the info. I didn't even think there would be a GUI for=20 this. o_O Dale :-) :-) --=20 I am only responsible for what I said ... Not for what you understood or = how you interpreted my words!