files don't appear when using tree-view listing in the powershell

0

i have a lot of files in the desktop directory but i dont know why when i use tree command to list all files for me in tree like order it just shows me the folders.

Here is how it does list the Desktop Dir:

enter image description here

while this problem doesn't simply occur for the book i currently go through and it lists the directory like this:

Now see this one to get my point:

enter image description here

for me not only it does not show's the files but also as you see in the second picture... it doesn't show me how many files are in it either.

if this is natural please tell me.

Moh Vahedi

Posted 2019-10-04T12:18:02.743

Reputation: 125

Along with the answers you've already gotten. Remember tree is not a PowerShell cmdlet, functions, code. It's normal Windows DOS/cmd.exe stuff. You of course can run virtually any DOS/cmd.exe using the PowerShell.exe, just as you can in cmd.exe, but you need to look to the cmd.exe help files for guidance. Point of note, sometimes, special consideration must be taken with se things, especially when you are using parameters / wildcards etc. Examples: https://blogs.technet.microsoft.com/josebda/2012/03/03/using-windows-powershell-to-run-old-command-line-tools-and-their-weirdest-parameters

– postanote – 2019-10-04T14:47:46.097

thank you @postanote – Moh Vahedi – 2019-10-04T16:40:30.447

Answers

1

The tree command by default displays only folders names. It does not display file-counts.

To also display the files, use the /f parameter:

tree c:\ /f

To better analyze the disk-space, you may use a free third-party product. See the article Best Free Disk Space Analyzer for a list of such products with reviews.

harrymc

Posted 2019-10-04T12:18:02.743

Reputation: 306 093

really thank you. you saved me today for 2 times :)) – Moh Vahedi – 2019-10-04T12:37:13.303

You are welcome. – harrymc – 2019-10-04T13:27:38.020

0

You need to do: tree /F

Normal tree only does directories.

DDiamond

Posted 2019-10-04T12:18:02.743

Reputation: 48