I was wondering if there was anyway I could modify my code to only post the basename of the file, instead of the entire file including the extension.. I\'m new to python, so I d
Simply in one line..., returns the found files without any file extension, for the files found in the given search directory with the requested file extension...!
Found_BaseFile_Names= [(f.split('.'))[0] for f in os.listdir(SearchDir) if f.endswith('.txt')]