"system cannot find the path specified" trying to run a .cmd from DOS

Page 2 of 3 FirstFirst 123 LastLast

  1. Posts : 5,092
    Windows 7 32 bit
       #11

    Just for grins I would log off, then log back on. Something is really weird if you can see the files in Explorer but dir command cannot see them. I don't think I've heard this one before.
      My Computer


  2. Posts : 10,485
    W7 Pro SP1 64bit
       #12

    LoganTherrion said:
    I have checked the properties actually. They are neither hidden nor read only, and it's not blocked or anything. I have full control to the files and the directory they're in.

    I got the same properties whether it was renamed to .txt or as a .jar. The .jar is 2.3M in size, and has no special permissions. And the properties are the same for each file.
    LoganTherrion said:
    I tried your suggestion and did a dir /ah someFile.cmd and dir /ah someFile.jar, and in both instances I got "File Not Found".

    If I rename either to .txt and do dir /ah someFile.<extension>, then I get expected output.
    And yet you asked the dir command to only show you hidden files.
      My Computer


  3. Posts : 8
    WIn 7 Enterprise
    Thread Starter
       #13

    Ha! How embarrassing. My intellectual and command line prowess is scaring even me. :) Let me try that again.

    dir /a someFile.jar: returns expected results (file size, name)
    dir /a someFile.cmd: returns expected results (file size, name)

    I'm checking out for the day soon but I will reboot again tomorrow morning. I agree - this is very strange. I've never seen behavior quite like this before.
      My Computer


  4. Posts : 10,485
    W7 Pro SP1 64bit
       #14

    Process Monitor might give a clue if you can compare the results with a working computer or perhaps another user profile on the same computer.
      My Computer


  5. Posts : 721
    Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
       #15

    LoganTherrion said:
    When my code runs, if the .jar file isn't there (renamed, removed, et al), the .cmd file can execute without the "system cannot find the path specified" error,BUT I do get an error that reads, "Didn't find drive:\folder\someFile.jar in directory drive:\folder.".
    The output of the .cmd script clearly changes upon altering a file it reads/uses, and that's a clear indication that the script is indeed alive and running. It's more presumable that the error message, "system cannot find the path specified", is being thrown by the script itself, and not from the command interpreter.

    Logan, have you considered creating and running a .cmd file that will Echo something like "Hello World"? Check if that works.


    MilesAhead said:
    if none of the paths are dot '.' then it will not search the current directory unless it happens to be explicitly listed.
    Rubbish.
      My Computer


  6. Posts : 5,092
    Windows 7 32 bit
       #16

    Pyprohly said:

    Logan, have you considered creating and running a .cmd file that will Echo something like "Hello World"? Check if that works.
    Why not cut to the chase? Unless it is confidential, just post the cmd script so we can see what is what.
      My Computer


  7. Posts : 8
    WIn 7 Enterprise
    Thread Starter
       #17

    I found the problem, though the behavior I've seen doesn't really seem like the cause would result in the types of errors I was seeing. Regardless, it looks like the JAVA_HOME was - unbeknownst to me, being reset in a batch file. So the java.exe could never be found. I fixed this problem and all works as expected now.

    Thanks everyone. You've all been exceptionally helpful and the turn around time and quality of your responses has been unprecedented.
      My Computer


  8. Posts : 6,285
    Windows 10 Pro X64
       #18

    What do you see if you enter dir by itself?

    Also, boot to Safe Mode or Safe Mode with Networking and try.
      My Computer


  9. Posts : 5,092
    Windows 7 32 bit
       #19

    Re: rubbish


    Pyprohly said:
    Rubbish
    Apparently along the way they fixed this and I didn't notice. But it was true for years. That is why you saw command lines like .\mybatch.cmd to force the current directory search. But I did check for dot in my Path. It is not there. But it did find stuff in the current directory.

    If anyone knows how many years it took them to fix it I would be curious. I know when I started with MSDOS 3.1 you had to add the dot to the path or type .\something.exe or the complete path to the file.

    I am on Windows 8.0.
      My Computer


  10. Posts : 1,519
    Windows 7 Ultimate 64-bit, Windows 8.1 64-bit, Mac OS X 10.10, Linux Mint 17, Windows 10 Pro TP
       #20

    I know when I started with MSDOS 3.1 you had to add the dot to the path or type .\something.exe or the complete path to the file.
    I am on Windows 8.0.
    I haven't noticed much difference in that in the Command Prompt window, just that there will be some things DOS that are not available in the Command Prompt on WinXP and later. I started with MS-DOS in '92 with Win3.1.

    You say you are using Win8.0 and your System Specs shows Win7. I strongly suggest you Update to Win8.1 [free from the Store] as the touted Win10 Upgrade won't be free for Win8.0, only for Win7 w/SP1 and Win8.1.
      My Computer


 
Page 2 of 3 FirstFirst 123 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 19:45.
Find Us