Skip to content

Instantly share code, notes, and snippets.

@ayubmetah
Created January 13, 2021 23:18
Show Gist options
  • Save ayubmetah/64188212a3c83ebfd4d26d496adec602 to your computer and use it in GitHub Desktop.
Save ayubmetah/64188212a3c83ebfd4d26d496adec602 to your computer and use it in GitHub Desktop.
This code requests the user to enter a directory in the local workstation and it lists he details of the all the files and folders in that directory with their full absolute path.
import os
get_directory = input("Enter path : ")
d = os.listdir(get_directory)
for dir in d:
currrent_path = os.path.abspath(dir)
print(currrent_path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment