Windows 10: MS PowerShell: The "dir" command can't find a direct subdirectory with the exact name.

Discus and support MS PowerShell: The "dir" command can't find a direct subdirectory with the exact name. in Windows 10 Gaming to solve the problem; It's a simple error happened when executing a "dir" command to find the "+Link" directory in the "Test" directory:Windows 11, Up to date on 2022-07-13.... Discussion in 'Windows 10 Gaming' started by HaVX, Jul 14, 2022.

  1. HaVX Win User

    MS PowerShell: The "dir" command can't find a direct subdirectory with the exact name.


    It's a simple error happened when executing a "dir" command to find the "+Link" directory in the "Test" directory:Windows 11, Up to date on 2022-07-13.

    :)
     
  2. DaveM121 Win User

    Command-line shells, commands like dir /p not working but dir does work

    Hi Rick.

    I am Dave, I will help you with this.

    The dir command works in PowerShell, the dir command with switches like /p does not work in PowerShell, run that command in Command Prompt and it will work.
     
    DaveM121, Jul 14, 2022
    #2
  3. KeithM Win User
    Cannot get to 'downloads' folder in Command prompt (admin)

    Everybody is giving you cmd.exe commands/switches, but your screenshot shows a PowerShell window!

    The reason familiar commands like cd and dir work in PowerShell is that they are aliases assigned to PowerShell Cmdlets.

    In PowerShell , from C:\Users, try the command: gci -Force to list all subdirectories, including hidden & superhidden. It's possible that a is displayed in Explorer via a LocalizedResourceNa entry in the folder's deskotp.ini file and the underlying file system name is different...
     
    KeithM, Jul 14, 2022
    #3
  4. MS PowerShell: The "dir" command can't find a direct subdirectory with the exact name.

    Powershell command file to automatically list file/folder names

    I used "dir /b > file.txt" in a shift+right-click command prompt window to get the result I needed. Now, shift+right-click only shows the option for Powershell. I don't necessarily want to edit the registry to change that so I'm trying to adapt. In Powershell, using the command "ls | % Name file.txt" does the trick but there's two things I want to be able to do...

    1) Double-click a single command file to run the script and automatically generate the text file I need
    2) Have the script ignore the "file.txt" and the command file itself (because it adds "file.txt" to the list, which I don't need)

    I have tried making a .ps1 file but my knowledge is very limited on using Powershell and I can't get it work exactly how I need. I don't need anything from the list other than the file/folder name itself (no properties such as size, type, etc.) Any help would be appreciated.

    Thanks!
     
    ReleaseTheKrkn, Jul 14, 2022
    #4
Thema:

MS PowerShell: The "dir" command can't find a direct subdirectory with the exact name.

Loading...
  1. MS PowerShell: The "dir" command can't find a direct subdirectory with the exact name. - Similar Threads - PowerShell dir command

  2. DIR Command

    in Windows 10 Gaming
    DIR Command: dir /A:D /B /S > FolderList.txt produces a list of all directories and subdirectories of a directory. I would like to modify this line to have the date included for all directories and subdirectories of a directory too....
  3. DIR Command

    in Windows 10 Software and Apps
    DIR Command: dir /A:D /B /S > FolderList.txt produces a list of all directories and subdirectories of a directory. I would like to modify this line to have the date included for all directories and subdirectories of a directory too....
  4. MS PowerShell: The "dir" command can't find a direct subdirectory with the exact name.

    in Windows 10 Software and Apps
    MS PowerShell: The "dir" command can't find a direct subdirectory with the exact name.: It's a simple error happened when executing a "dir" command to find the "+Link" directory in the "Test" directory:Windows 11, Up to date on 2022-07-13....
  5. Bug in the DIR command?

    in Windows 10 Network and Sharing
    Bug in the DIR command?: Hi all. I'm running Version 10.0.17134.1365 and recently I've been testing long file names and how they're handled in an application that I work on. Strangely I noticed that when I try to see what the short name is for one of these files, they're not displaying correctly....
  6. DIR commands

    in Windows 10 Ask Insider
    DIR commands: So recently I used the DIR commands to be able to see hidden and Invisible files, is there any way to revert this? submitted by /u/Creeper_King_558 [link] [comments] https://www.reddit.com/r/Windows10/comments/inyfq2/dir_commands/
  7. Windows can't find my PowerShell (administrator) command

    in Windows 10 Support
    Windows can't find my PowerShell (administrator) command: Something seems to be wrong with my system files. Don't get the double arrows when I try to adjust my Taskbar's height. Can't access Power Shell (administrator) to run Dism. So, used Dism>Restore Health using Command Prompt then ran sfc ?scannow. Didn't find any corrupt...
  8. Windows dir name

    in Windows 10 Installation and Upgrade
    Windows dir name: My computer will not start. My probing has revealed that Windows is "gone" Where it's supposed to be is a dir called"$WINDOWS.·-BT" I can't get the squiggly line to type. 1.what is the correct name of the Windows 10 directory? 2. How do I change it in the CMD prompt?...
  9. MS can't can't find my user name

    in User Accounts and Family Safety
    MS can't can't find my user name: I just installed Office 2016 professional and it's working fine. My problem is when they ask for my user ID and password. I ran the Microsoft Support and Recovery Tool just to see if I have any problems. I was asked to put in my User ID and password. I was told that that user...
  10. Hidden char in file name showed by command dir

    in Windows 10 Support
    Hidden char in file name showed by command dir: Hi, In tracking a bug in app, I discovered something very odd. I have a strange file name in a directory. If I do a dir command the file name appearing is not the same as with Win Explorer! Even the copy paste from the console removes the extra char. Attached...