There is a folder X that I am using to put video file that I'm uploading to YouTube.
I would be putting various video files to folder X in such a way that at any point in time, folder X would either be empty or would have only a single video file (which, I would take care of manually).
I need Keyboard Maestro to change the name of the file (whatever video file is there at that point in time in folder X). I am calling this changed file name here as 'video title' as that is going to be the title of the video on YouTube. 'Video_title' is a KM variable that would have different text each time (which would be changed using another macro).
Sounds pretty easy but I'm still not being able to wrap my head around it. I tried understanding this post but couldn't.
Is this what you mean? Set the path in the green action to your upload folder and trigger the macro. If the folder contains a file, it will be renamed according to your global variable Video_title. It assumes there really is only one file in there at a time.
You in fact provided more comprehensive macro taking care of other aspects (for example, number of files in the folder) than I was hoping for. Thank you.