On Feb 17, 2009, at 11:38 AM, Dennis Kibbe wrote:
Actually, if the original specification is co=rrect, probably none of the solutions proposed is likely to work. It = appears that the target name for the first rename is the same as the source= for the second. If this were true one would have to ensure that rena= me or move operations were done in an order to avoid attempts to overwrite =existing names.That's correct. So renaming needs to start at the end. (There are actually 24 files in the directory.)so renaming: ccna.pod24.pc1.ext to ccna.pod25.pc1.ext needs to happen before renaming: ccna.pod23.pc1.ext to ccna.pod24.pc1.ext and so on down to: ccna.pod1.pc1.ext to ccna.pod2.pc1.ext
Could you perhaps keep the original files in some other naming convention, and create symlinks in the ccna.podXX.pc1.ext format? It might be easier to write a script, then, to :
- remove all old symlinks - sort the original files by descending mtime - create new symlinks sequentially, 1-24.This eliminates the need to parse the existing file names to figure out which sequence number they have.
Just a thought. alex
PGP.sig
Description: This is a digitally signed message part
--------------------------------------------------- PLUG-discuss mailing list - [email protected] To subscribe, unsubscribe, or to change your mail settings: http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
