You can loop through a folder to get all your text files.
import os
folder= r'path_to_your_folder_of_text_files'
for root, dirs, files in os.walk(folder):
for filename in files:
input_file = os.path.join(root, filename)
# You can then run your conversion script here
# Use input_file for your input into your script.