This is no new idea.
See e.g. this thread from 2010.
The general problem I see: how can it happen that you end up with duplicate names in the same folder?
If you want to get around it, you can add %_counter% to each filename an then remove it if you don't need it any more. Or revise your neaming scheme so that it does not lead to duplicate filenames.