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

Discus and support Command-line shells, commands like dir /p not working but dir does work in Windows 10 Customization to solve the problem; I am using W'10, Administrative Windows Power Shell, command line.When I do a "DIR" it works, but when I add parameters, I get this error... Discussion in 'Windows 10 Customization' started by RickRagan001, Apr 3, 2022.

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


    I am using W'10, Administrative Windows Power Shell, command line.When I do a "DIR" it works, but when I add parameters, I get this error message:-----------------PS C:\> dir /sdir : Cannot find path 'C:\s' because it does not exist.At line:1 char:1+ dir /s+ ~~~~~~ + CategoryInfo : ObjectNotFound: C:\s:String [Get-ChildItem], ItemNotFoundException + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand-------------------------------------------------------------------------------------------------------------I am just following the syntax fr

    :)
     
    RickRagan001, Apr 3, 2022
    #1

  2. dir Difficulties

    I am getting the hang of this command set.

    Maybe somebody know a work around that will list the three time stamps at one time.
    Theoretically dir /TC /TA /TW.
    dir will only show one of the three at one time.

    To me it seems that the only way to get all three on a line is to run loop with output to file, then boiling down the three outputs to one line. Clumsy but maybe the only way to get the job done?

    Thanks for any suggestions.
     
    mikeincousa, Apr 3, 2022
    #2
  3. DaveM121 Win User
    Dir cmd arguments not working

    Hi Mike, the Dir command will work in Powershell, but it will not work with the w switch in powershell, that switch will only work in Command Prompt

    Click your Start Button, type cmd, then right click Command Prompt and choose 'Run as Administrator'

    In the application the dir /w command will work . . .
     
    DaveM121, Apr 3, 2022
    #3
  4. Command-line shells, commands like dir /p not working but dir does work

    Unable to create Command Prompt output like I have done before regarding the Dir command

    Hi Charles,

    I'm Independent Advisor not Microsoft employee or support person. But I'm in contact with Windows developers since 1995 - as a one of the best Windows beta-testers till 2009 when program was closed, as an MVP in 2005-2017 including Windows System & Performance
    nomination. So I have deep enough Windows knowledge and you may trust me. It's a pleasure for me to help others and I'll do all my best to help you.

    If you want to see only directory list but no files you may use dir /ad command or dir /ad /s command.

    The list you've show above is not a result of dir command AFAIK.

    If the result of dir command is not sufficient to you please clarify your request.
     
    Igor Leyko, Apr 3, 2022
    #4
Thema:

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

Loading...
  1. Command-line shells, commands like dir /p not working but dir does work - Similar Threads - Command line shells

  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. Command-line shells, commands like dir /p not working but dir does work

    in Windows 10 Gaming
    Command-line shells, commands like dir /p not working but dir does work: I am using W'10, Administrative Windows Power Shell, command line.When I do a "DIR" it works, but when I add parameters, I get this error message:-----------------PS C:\> dir /sdir : Cannot find path 'C:\s' because it does not exist.At line:1 char:1+ dir /s+ ~~~~~~ +...
  5. Command-line shells, commands like dir /p not working but dir does work

    in Windows 10 Software and Apps
    Command-line shells, commands like dir /p not working but dir does work: I am using W'10, Administrative Windows Power Shell, command line.When I do a "DIR" it works, but when I add parameters, I get this error message:-----------------PS C:\> dir /sdir : Cannot find path 'C:\s' because it does not exist.At line:1 char:1+ dir /s+ ~~~~~~ +...
  6. 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....
  7. 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/
  8. Cannot dir in My Documents folder from a command line

    in Windows 10 Network and Sharing
    Cannot dir in My Documents folder from a command line: I am the owner of My Documents, and I have Full Control. I can use Windows Explorer to navigate inside this folder, but whether I use Command Prompt or Powershell, I cannot use the dir command. Command Prompt says "File Not Found." PowerShell gives a long error message that...
  9. Dir command gives unexpected / unwanted results

    in Windows 10 Support
    Dir command gives unexpected / unwanted results: If I open a command prompt window and give the command " dir *.xls", I also get all xlsm, xlsx, xlsq etc files. This behaviour is unwanted and illogical. it makes scripting hopelessly complex and unreliable. If I wanted those files, I would issue a "dir *.xls?" command. For...
  10. A shell command? How does that work?

    in Windows 10 Software and Apps
    A shell command? How does that work?: DaveM121 showed (https://answers.microsoft.com/en-us/windows/forum/apps_windows_10-winapps-appscat_tools/solvedhow-can-i-run-timeexe-from-a-command-prompt/06ae47c8-47b7-4207-9c34-26b3d714b6d2) that, if I want to run this: "C:\Program...