import os # Directory containing the uploaded files directory = "D:/xampp/htdocs/Groot-Academy-Website-New/" # List to hold all the file names file_names = [] # Walk through directory and subdirectories for root, dirs, files in os.walk(directory): # Ignore the 'wp-admin' directory if 'wp-admin' in dirs: dirs.remove('wp-admin') for file in files: # Append the relative path of the file to the list file_names.append(os.path.relpath(os.path.join(root, file), directory)) # Generate the HTML content html_content = """