Windows 10 Powershell tree command, how to show files

How do I list folders and files using the PowerShell tree command? Is it possible to color format the output for distinct files and folders?

2

2 Answers

Simply use tree /F on any powershell instance to have the same behavior the normal tree on UNIX has.

The tree alone on Powershell shows only folders but not files in them.

TREE Drive:\path /F

If command prompt or power shell are not recognizing 'tree', then:

Go to environment variables and change both the user variables and system variables "Path" to C:\Windows\System32(Mine is C:\Windows\System32 ,Find yours using %systemroot%\System32)

Then open a new power shell and give the above command. EX:enter image description here

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like