Link to home
Start Free TrialLog in
Avatar of Crash2100
Crash2100Flag for United States of America

asked on

Batch File String Functions?

Is there any way I can get the containing folder and the filename (without the extension) using a batch file?

I'm trying to write a batch file to open Java programs I'm writing.  I'm using NetBeans to write the programs, but from what I can tell, there's no way to open a class file and have it automatically execute in NetBeans.  So I'm trying to write a batch file or something that I will associate with class files.

I need the batch file to do something like this:
    Say the file I opened is "E:\Programming Files\Java\SwingCalc\SwingCalc.class"
    It will do this...
        CD "E:\Programming Files\Java\SwingCalc\"
        java SwingCalc
        pause

If this can't be done with a batch file, is there any way I could do this using a VB script or something else that's built into windows?
ASKER CERTIFIED SOLUTION
Avatar of Crash2100
Crash2100
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Crash2100, you should close this question and get a refund for your points.  Take a look at the below to see how to do this:

https://www.experts-exchange.com/help.jsp#hi71
Avatar of Crash2100

ASKER

I already posted a question in CS for them to close it.