Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


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

13 Jul 2015   #11
MilesAhead

Windows 7 32 bit
 
 

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 System SpecsSystem Spec
.
13 Jul 2015   #12
UsernameIssues

W7 Pro SP1 64bit
 
 

Quote   Quote: Originally Posted by LoganTherrion View Post
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.
Quote   Quote: Originally Posted by LoganTherrion View Post
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 System SpecsSystem Spec
13 Jul 2015   #13
LoganTherrion

WIn 7 Enterprise
 
 

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 System SpecsSystem Spec
.

13 Jul 2015   #14
UsernameIssues

W7 Pro SP1 64bit
 
 

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 System SpecsSystem Spec
14 Jul 2015   #15
Pyprohly

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
 
 

Quote   Quote: Originally Posted by LoganTherrion View Post
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.


Quote   Quote: Originally Posted by MilesAhead View Post
if none of the paths are dot '.' then it will not search the current directory unless it happens to be explicitly listed.
Rubbish.
My System SpecsSystem Spec
14 Jul 2015   #16
MilesAhead

Windows 7 32 bit
 
 

Quote   Quote: Originally Posted by Pyprohly View Post

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 System SpecsSystem Spec
14 Jul 2015   #17
LoganTherrion

WIn 7 Enterprise
 
 

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 System SpecsSystem Spec
14 Jul 2015   #18
Ztruker

Windows 10 Pro X64
 
 

What do you see if you enter dir by itself?

Also, boot to Safe Mode or Safe Mode with Networking and try.
My System SpecsSystem Spec
15 Jul 2015   #19
MilesAhead

Windows 7 32 bit
 
 
Re: rubbish

Quote   Quote: Originally Posted by Pyprohly
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 System SpecsSystem Spec
15 Jul 2015   #20
Berton

Windows 7 Ultimate 64-bit, Windows 8.1 64-bit, Mac OS X 10.10, Linux Mint 17, Windows 10 Pro TP
 
 

Quote:
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 System SpecsSystem Spec
Reply

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




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Open a new window with "full path" instead of Search Results\"Path"
How can I make it such that in Search Results, when I open a folder in a new window (by right-clicking a file), I will be directed to a window with the "full path" displayed in the address bar, instead of Search Results\"Path" or Search Results>"Path"? Edit: "Right-click -> open file location"...
General Discussion
System Image: "System cannot find the file specified (0x80070002)"
I have a Dell 2330 all-in-one running Win7 64 bit. I'm trying to do a system image back up to a USB3 external hard drive. The image will take up about 333gb and I have about twice that amount of space left on the 1 TB drive. I get the error message: System cannot find the file specified...
Backup and Restore
Cant find "System Image" of 36 GB but its shows on "Manage Disc Space"
Dear Experts, I have created windows image on Drive F: but delete it after some time manually due to some space prob. But while backup shows about 40 GB only few GB space got free after deletion. When i try to again take the the backup using windows 7 backup & restore option, its still shows 35...
Backup and Restore
Teracopy: "Open error: The system cannot find the path specified"
I'd like to use Teracopy for all copying etc. but after moving to 7 from xp it's giving me these errors. I have Win 7 Pro 64-bit. I copy from network drive for which I have read and write permissions as windows' own copy works fine. But with teracopy I immediately get error "Open error: The...
Software
"System Can't Find Path Specified" Error During Backup
I automatically back up my hard-drive weekly to an external drive. For several weeks I didn't notice that the capacity of my external drive had been exceeded. At that point I deleted several of the older data file backups, thus giving me ample space on the external drive to once again perform my...
Backup and Restore
"The system cannot find the file specified" Driver install
I recently purchased a wireless adapter for xbox 360. its not a genuine microsoft product. i have tried everything to install the driver but everytime it says "Windows found driver software for your device but encountered an error while trying to install it xbox360 wireless reciever for windows...
Drivers


Our Sites

Site Links

About Us

Find 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 14:58.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App