From: urgrue Subject: Re: shell/Perl question Date: Tue, 2 Nov 2004 12:20:46 +0200 Message-ID: <20041102102046.GA24071@fede2.tumsan.fi> References: Mime-Version: 1.0 Content-Transfer-Encoding: 7BIT Return-path: Content-Disposition: inline In-Reply-To: ; from julius_vick@hotmail.com on Tue, Nov 02, 2004 at 06:21:44 +0200 Sender: linux-admin-owner@vger.kernel.org List-Id: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: vick Julius Cc: linux-admin@vger.kernel.org i think i win for "shortest version", using mmv: mmv "*/*.jpg" "Photos/#1#2.jpg" On 2004.11.02 06:21, vick Julius wrote: > Hi everybody > > I have several directories (around 10) named ABC, DEF, GHI,... > Each directory contains more than 50 files named, for example, 1.jpg, > 2.jpg, 3.jpg,...50.jpg > These names are the same in each directory (this is what digital > cameras do, they give the same names...) > My problem is: I want to put all these files in the same directory, > for example, Photos, with the following names: > 1ABC.jpg, 2ABC.jpg, ...50ABC.jpg, 1DEF.jpg, 2DEF.jpg...50DEF.jpg,... > each image filename (such as 1.jpg) will be split and to insert the > name of the directory (such as ABC..) after the first part of the > name and finally append the extension (.jpg) to the filename. > > Any idea? > Thanks > > Vick > > _________________________________________________________________ > Don't just search. Find. Check out the new MSN Search! > http://search.msn.com/ > > - > To unsubscribe from this list: send the line "unsubscribe linux- > admin" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >