create folder with an incremental suffix automatically if folder already exist

19 views
Skip to first unread message

rohit ragunath

unread,
Feb 5, 2021, 12:55:31 AM2/5/21
to Ansible Development

Hi Team,

I came across a scenario, when a folder should be created with a suffix appended in incremental order.
For example: if the Directory /Sample/Test dir already exist and if the path is /Sample/Test, then a directory /Sample/Test1 will be created. On subsequent run the number keeps increasing.
Thought of adding a new attribute impose_suffix, if set to True to achieve the above.

Just wanted to check if this is something that we can consider as change request or if its a common scenario that can be generalized to make it a feature.


Please let me know your thoughts.

Regards
Rohit

Reply all
Reply to author
Forward
0 new messages