You can use the os
module and its listdir
function to find folders by name in a directory. Here is an example:
main.py492 chars17 lines
This code will iterate through all contents of the specified directory and check if each item is a directory with the specified name. If a matching folder is found, the code will print its name.
gistlibby LogSnag