Created
July 14, 2023 14:34
-
-
Save llctrautmann/dc18108d606feef5e481345655c90a9c to your computer and use it in GitHub Desktop.
Count_files_in_folder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import glob | |
| def count_files(folder_path): | |
| file_list = glob.glob(os.path.join(folder_path, '*')) | |
| return len(file_list) | |
| # Specify the folder path you want to check | |
| folder_path = '../data/AudioMNIST' | |
| # Call the count_files function | |
| num_files = count_files(folder_path) | |
| print(f"Number of files in {folder_path}: {num_files}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment