Re: Feedback needed: Sequential numbering
Posted: Fri Nov 13, 2009 7:30 pm
Well, it gets a bit more complex. Let's say you have a pattern like:
(name)-(#)
Problem is that (name) can change as well. So if you have files "alligator", "bear", "cat" and pump them through this pattern you get: "alligator-1", "bear-2", "cat-3". Basically, getting too fancy with trying to figure out patterns from existing file will be weird. This also makes filling in the gaps kinda weird as well.
I don't know about any auto-resetting. No one has come up with a use case to demonstrate how it would be used and I don't want to implement it without some feedback. I'd prefer to not have any resetting and add it later (though it might be a while until 3.0 so people would have to make do with doing it via the commandline).
If you do reset the counter, it will work normally starting from 1. If the name is taken (whether that name was created by a pattern previously or just happened to match by coincidence), it will increment the counter until it can find a unique name. I think it's the best I can do given all the possible variables involved. I think trying to determine whether an existing file is one generated using a counter won't be reliable. If the user specifies a pattern with the counter, then that pattern will be adhered to and should be enough for most purposes.
And sorry, this is getting a bit esoteric but let's just say that I probably won't do much with existing files. The focus is on generating new file names.
(name)-(#)
Problem is that (name) can change as well. So if you have files "alligator", "bear", "cat" and pump them through this pattern you get: "alligator-1", "bear-2", "cat-3". Basically, getting too fancy with trying to figure out patterns from existing file will be weird. This also makes filling in the gaps kinda weird as well.
I don't know about any auto-resetting. No one has come up with a use case to demonstrate how it would be used and I don't want to implement it without some feedback. I'd prefer to not have any resetting and add it later (though it might be a while until 3.0 so people would have to make do with doing it via the commandline).
If you do reset the counter, it will work normally starting from 1. If the name is taken (whether that name was created by a pattern previously or just happened to match by coincidence), it will increment the counter until it can find a unique name. I think it's the best I can do given all the possible variables involved. I think trying to determine whether an existing file is one generated using a counter won't be reliable. If the user specifies a pattern with the counter, then that pattern will be adhered to and should be enough for most purposes.
And sorry, this is getting a bit esoteric but let's just say that I probably won't do much with existing files. The focus is on generating new file names.