This is not an offer to write said code for you but there are command line encoding and video editing tools that you could batch process them all.
https://www.google.com/search?q=resize+video+command+line finds FFMPEG and discussions about batch processing.
I have up-to 200 videos of different frame size (height and width) and I want all of them with same height and width. But definitely, it would be time taking if I resize all of them one by one. I tried adobe premier but it creates sequence instead of individual videos. Moreover exporting individual edited videos is also tiresome. Is there any free software or any other way that could do this easily? Thanks in advance