Bulk Rename Beta

Luke S
  • Luke S

    Luke S - 2014-06-05

    I've been trying to put together what should be an extremely simple script for a requester over on FS. Basically, he wants to rename a whole bunch of objects with one command, with the ability to add a serial number at the end - MyObj 1, MyObj 2, etc.

    I notice that there is a similar request in feature requests.

    I've bumped my head on this for a bit. Groovy is different. It helps to read the documentation. ;)

    So here is the first working result. Try it out, tell me what you think. What should I work on next? I'm thinking that it might be nice to be able to specify the format of the serial numbers. - number of digits (001 vs. 00001, etc.), numeric or alphabetic? Thoughts on what, if anything, would be handy here.

    This is just a basic tool script. Drop in Scripts>tools and you are ready to go.

    Last edit: Luke S 2014-06-05
  • Pete

    Pete - 2014-06-06

    Well at least you did not seem to take the most straight forward approach .... I had only in mind that it would look for all objects with a name specified in the script body and add a number to the end...

    Basically I like the idea about formatting the numbers. How useful that would after all be, I can't say, but fixed length fields could make life easier for example, if the objects are going to be handled further by scripts...

  • Luke S

    Luke S - 2014-08-06

    Okay, been a while. I've updated the script a bit, just got around to uploading version 0.3 now.

    • You can now specify zero-padding for the serial number
    • If the number of items overflows the zero padding (EG, pad to three digits, but have more than 999 items) the serial number will grow. (1000+ will be listed at full length)

    Two things:

    • I've tried to get the script to turn off the padding controls if user chooses not to use a serial number, but it's not working. I'm not sure if my error is in my understanding of buoy or of Groovy. The script gives the correct answers, just the UI does not respond quite how I intended. Any help here would be appreciated.
    • Should I consider adding an option for overflowed serials to roll back to 000? Or is this too much of an edge case?
    Last edit: Luke S 2014-08-06

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks