Help with scripts or buttons for automating some tasks

i was trying to get chatgpt to make a script to so some of these but i just kept running into errors.

*a script to add to a button that would check for any folders in the current directory i am in and take all the files out and delete the empty folders after. and one for just deleting all empty folders in the current folder i am in.

*a script to combine all small videos in current folder into one single video possibly using ffmpeg or something

*a way to make it so outside folders open in a specific panel while using dual lister instead of just whatever panel i have active

*a way to make it so when i middle click a folder with the no duplicate tabs option on it moves the tab to the end of the list of open tabs

*a way to rename a folder from the tab list instead of just renaming the tab itself

thanks in advance if you can help with any of this at all

Please Ask one question per thread - One thread about five different scrips would quickly become impossible to follow.

sorry will do