-1

I have an issue when I am using dir command in the Windows terminal (Powershell). I see no output. I am just wondering what is wrong because the Powershell command line is working fine...

Many thanks for any help!

Lukáš Tůma
  • 350
  • 2
  • 15
  • 1
    [Get-ChildItem aka dir](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-childitem) – Theo Aug 22 '21 at 10:51
  • 2
    Just a friendly, neighborhood reminder that questions on this site should be about *"specific coding, algorithm, or language problems."* This question appears to be about an issue you are having with Windows Terminal and would likely be better suited for [Super User](https://superuser.com). I would recommend deleting it here and reposting it on the proper site. Thanks! – NotTheDr01ds Aug 22 '21 at 13:27
  • @NotTheDr01ds Just a friendly, neighborhood reminder - This is an issue of coding and I am happy that someone helped me to understand the code I am writting... – Lukáš Tůma Aug 22 '21 at 15:13
  • 1
    Hmm - as you said it *works* under the PowerShell command-line, but doesn't work under Windows Terminal. That makes it sound like something specific in Windows Terminal. If the answer helped you, then it's still a *shell command* that was your issue, not a programming question. Neither one would be on-topic here. – NotTheDr01ds Aug 22 '21 at 15:20
  • I have no problem using `dir` in powershell, so you would have to include enough detail in your question for someone to be able to reproduce the problem, or you should provide enough diagnostics to explain what you expect you should see vs what actually happened. – Wyck Aug 23 '21 at 04:06

1 Answers1

0

Maybe the files are hidden, try running Dir -force

Dir is an alias of Get-childitem

Try the following command to see this:

Get-Alias dir

I would recommend that you stop using Dir and just use Get-childitem

Other useful Get-childitem options:

Set-Location C:\temp # This changes the location of the folder you are in. 

Get-ChildItem C:\temp -Recurse # get all files in all folders

I'm not sure what else to suggest. Get-Childitem is usually a reliable command and providing there are files in the folder, then they are usually displayed.

Judd Davey
  • 349
  • 2
  • 5