Skip to content

Instantly share code, notes, and snippets.

@makesomelayouts
Last active February 2, 2023 21:41
Show Gist options
  • Select an option

  • Save makesomelayouts/0bfbce08d1117d0fa8ba09a23c6a7e82 to your computer and use it in GitHub Desktop.

Select an option

Save makesomelayouts/0bfbce08d1117d0fa8ba09a23c6a7e82 to your computer and use it in GitHub Desktop.
prints what is contained in the folder
import os
def main():
i = 0
source_dir = input('folder path: ')
with os.scandir(source_dir) as entries:
for entry in entries:
i += 1
print(f'{i} :: {entry.name}')
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment