Date: Mon, 4 Jan 2010 20:59:11 +0100 From: Polytropon <freebsd@edvax.de> To: =?ISO-8859-1?Q?D=E1rio?= "P." <fbsd.questions.list@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: Rename pictures in the command-line interface Message-ID: <20100104205911.24b5296c.freebsd@edvax.de> In-Reply-To: <1262632437.11494.18.camel@dasp-laptop> References: <1262624558.9656.16.camel@dasp-laptop> <20100104191610.5054255f.freebsd@edvax.de> <1262632437.11494.18.camel@dasp-laptop>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 04 Jan 2010 20:13:57 +0100, D=E1rio "P." <fbsd.questions.list@gmail= .com> wrote: > The sorting order is not a big problem for me, at least for now. I'm > doing the renaming in one machine with GUI then I upload the pictures to > another machine. The only reason that I need this, is because sometimes > I delete one picture on the other machine and then I have to rename > everything again. In this case, pay attention that the renumber script does not pay attention to not overwrite files. This can lead to problems when adding files. Let's say you have pic_01.jpg pic_02.jpg pic_03.jpg and add a file new.jpg, so you have new.jpg pic_01.jpg pic_02.jpg pic_03.jpg If you now run renumber pic jpg you'll have pic_01.jpg =3D new.jpg pic_02.jpg =3D pic_01.jpg pic_03.jpg =3D pic_02.jpg pic_04.jpg =3D pic_03.jpg and the "source pics" will be "removed", so you end up with pic_04.jpg =3D neu.jpg A workaround is to use the MC to prefix all files with an arbitrary letter, and THEN run renumber, e. g. select all (grey *), PF6, to "X*" (where "X" is the arbitrary letter) and have Xnew.jpg Xpic_01.jpg Xpic_02.jpg Xpic_03.jpg which can be processed with "renumber pic jpg" now without any problems because the existing prefix isn't the same as the renumbering prefix. As you see: I have a reason to believe that I should better write a new script that takes such things into mind and maybe offer reverse renumbering, overwrite protection and a better selection which files (instead of hardcoded *) to process. > > So if you wish to do some file preparation, know that the > > powerful Midnight Commander can do this for you (select and > > PF6). >=20 > Anyway, I gonna look at it. It's worth it. The MC is a powerful and still easy to use tool for file administration. --=20 Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100104205911.24b5296c.freebsd>