File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Grabbing File names only Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Grabbing File names only" Watch "Grabbing File names only" New topic

Grabbing File names only

Andy Lukavich

Joined: Nov 23, 2007
Posts: 7
Is it possible to just grab a file name, and turn it into a String to be used in another place in code?

What I am trying to do is allow the user to select the file they want to convert from XML into one of our document formats. Since you have to run the actual conversion command through DOS, i created a batch file that does the conversion.

I want to be able to grab that file name and add it to the batch file, so i can run the convert.

Any help would be appreciated.
Andy Lukavich

Joined: Nov 23, 2007
Posts: 7
Never mind, it came to me shortly after i posted this!
I agree. Here's the link:
subject: Grabbing File names only
Similar Threads
PDF to Excel conversion using Java
Reference problem
Run A batch file
How to Run a batch file???
run java code through bat file