Jump to content

strange batch error


ripken204

Recommended Posts

i am trying to run a batch file to open something on the e:/ drive, but the cmd give this error

"e:/programs is not recognized as an internal or external command

edit:

i think the problem is just when im trying run something from the E:\Programs(x86) directory

edit again:

ok i am right, and i need quotes-> E:\"Programs(x86)"\Java\jdk1.6.0\bin\java.exe Account

that works. but the problem i have now it that im using textpad to write my java programs and it automatically makes a batch file with no qutoes to run the .class file, so does anyone know how to tell textpad to use quotes? or is there a directory i can set?

"E:\Programs(x86)\Java\jdk1.6.0\bin\java.exe" Account

this also works..

Edited by ripken204
Link to comment
Share on other sites


well the thing is that i need to find a way to have textpad do this automatically for me, i dont want to have to change code each time i go to compile and run a file.

edit:

well the only way i can make this works is to install java to c:/java for now. i just really wish there was a solution to this problem..

Edited by ripken204
Link to comment
Share on other sites

I do not know if this will help you but here is a VBS script.

What this script does is run a loop that collects all the

hard drives on the local computer then it checks for

the path to the exe.

Save As StartJava.vbs

Dim Act  : Set Act = CreateObject("Wscript.Shell")
Dim Fso : Set Fso = CreateObject("Scripting.FileSystemObject")
Dim Java : Java = "\Programs(x86)\Java\jdk1.6.0\bin\java.exe"
Dim Drv, StrD
Set Drv = Fso.Drives
For Each StrD In Drv
If StrD.DriveType = 2 Then
If Fso.FileExists(StrD & Java) Then
Act.Run(Chr(34) & StrD & Java & " Account" & Chr(34)),1,True
End If
End If
Next

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...