Using py2exe I've made an exe file which processes a file then creates a new file which details the errors found in the original file.
However, at the moment I have to change the file allocation in the code each time I want to do it on a different file name.
I'm looking to either be able to drag and drop a file onto the exe and treat that as the input, or enable the script to work no matter what the file name is (as long as it ends in .kml).
In an ideal world I'd love to be able to throw a bunch of .kml files into a folder then just double click the exe and have it create a txt file for each .kml called [original file name]-errors.txt.
I can vaguely picture how to do this but I'm completely thrown by the file handling aspect of it. Could anyone please explain how to work with files without knowing their names? Initially struck my mind as maybe *.kml working, didn't naturally, probably a better way of explaining it though.
I'm not very skilled with file handling and programming in general beyond the basics, so a simple explanation would be great.
Help is MUCH appreciated, and thank you in advance.