0

I am trying to get the list of all folders and files (including hidden and operating system files) within a drive. I cannot loop it as each folder has different depth. Is there any command in cmd that lets us see each file and folder within a drive with their absolute paths provided? Thanks.

Pranav Krishna S
  • 324
  • 2
  • 13
  • 1
    tried `os.walk`, `glob.glob`? – Lei Yang Feb 08 '22 at 03:15
  • On *nix, the `tree` command does this. edit: oh. `tree` is/was a DOS command. Does it suit your needs? It'd be `tree /f` – Jack Deeth Feb 08 '22 at 03:16
  • you most certainly can loop. lots of ways to handle depths including recursion. – Abel Feb 08 '22 at 03:18
  • Does this answer your question? [How do I list all files of a directory?](https://stackoverflow.com/questions/3207219/how-do-i-list-all-files-of-a-directory) – ti7 Feb 08 '22 at 03:25

1 Answers1

1

In the Windows command prompt, you could try tree /f.

However this might not include hidden files.

Jack Deeth
  • 3,062
  • 3
  • 24
  • 39