This command will move the contents of one or more folders to the parent folder. But if there are identical file names with the same extension then there will be files that are overwritten during the move.
find . - mindepth 2 -type f -exec mv "{}" . \; && fin d . - type d -empty -delete
How can I modify this command so that any files with duplicate file names won't be overwritten but will be appended with (1), (2), (3), et cetera?