1.    16 Oct 2015 #1
    Join Date : Oct 2015
    San Antonio, TX
    Posts : 5
    Windows 10545

    CMD command prompt (CPT) usage and explanations


    I was wondering why file not found would occur when I try to access a DIR command on a directory.

    DIR name >> file.txt

    Sincerely,

    Bash
      My ComputerSystem Spec
  2.    16 Oct 2015 #2
    Join Date : Sep 2014
    Posts : 340
    Window 10

    Quote Originally Posted by Bash View Post
    I was wondering why file not found would occur when I try to access a DIR command on a directory.

    DIR name >> file.txt

    Sincerely,

    Bash
    The syntax you are using is incorrect. The command to get a list of files in a directory is simply dir. What are you trying to do? The command prompt windows thinks you're trying to issue a command which does not exist; hence the "file not found."
      My ComputerSystem Spec
  3.    16 Oct 2015 #3
    Join Date : Oct 2015
    San Antonio, TX
    Posts : 5
    Windows 10545
    Thread Starter

    DIR command syntax


    Quote Originally Posted by PJLLB View Post
    The syntax you are using is incorrect. The command to get a list of files in a directory is simply dir. What are you trying to do? The command prompt windows thinks you're trying to issue a command which does not exist; hence the "file not found."
    I have seen uppercase commands in the documentation I have for WINDOWS 10.
    When do you use lower-case commands ?

    dir DirectoryName >> file.txt might work.

    I will try this now.

    Bash
      My ComputerSystem Spec
  4.    16 Oct 2015 #4
    Join Date : Oct 2015
    San Antonio, TX
    Posts : 5
    Windows 10545
    Thread Starter

    DIR syntax


    OK, I previously had dir command in lower case.

    I have a set command first.

    set dir1=DirectoryFilePath
    set filePath=FilePath.txt

    dir %dir1% >> %filePath% || goto Label

    This results in file not found for some directory that I know exists ???

    Thanks for the help so far !

    Bash
    Last edited by Bash; 17 Oct 2015 at 17:54.
      My ComputerSystem Spec
  5.    17 Oct 2015 #5
    Join Date : Oct 2015
    San Antonio, TX
    Posts : 5
    Windows 10545
    Thread Starter

    path error


    The system cannot find the path specified

    == is the new error I am now seeing

    set dirName=directoryFolderPath

    cd %dirName%

    gives this new error.

    Thanks for keeping up with this issue.
      My ComputerSystem Spec
  6.    18 Oct 2015 #6
    Join Date : Oct 2015
    San Antonio, TX
    Posts : 5
    Windows 10545
    Thread Starter

    I was trying to emulate IF EXISTS


    Hi Again,

    I see the folders on my desktop libraries but I cannot access them using any valid CMD command prompt use.

    I used IF EXISTS dirName and it is not found ??

    Is there some kind of access permissions I need to obtain first ??

    Bash
      My ComputerSystem Spec

 


Similar Threads
Thread Forum
Command Prompt Experimental changes
Anyone figured out a use for the Opacity setting for Command Prompt on the Experimental tab? I've tried it at many different settings and I just can't see a use for it.
General Support
Solved Command Prompt
How to call up "command Prompt (Admin) from the "run" dialog box win 10 Home?
General Support
Command Prompt Won't Close
Ok, so on my Dell Latitude E6520 laptop, I can open command prompt (Normal and Admin), but can not close any of the CMD windows I open unless I go through the Task Manager and shut them down. I do not have that issue on my desktop, which is also...
General Support
Command Prompt?
Guys, I'm going to try one last time. The error code I received told to me to empty files and then "Run the command prompt as an administrator"?? Then, type wuauclt.exe/update now??......I don't know what run the command prompt means. I have no...
General Support
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 19:56.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums