open file in a folder
if i have a powerpoint filemyfile.pps and i saved in a folder of any folder name in the f:// directory, how do i execute the file? Using this following codeRuntime.getRuntime().exec(new String[]{"cmd /c start","f:/myfile.pps"});
thanks
[393 byte] By [
sarah007a] at [2007-11-27 8:49:51]

Maybe using \\ as a path divider would help here. I don't know how Windows reacts on the slash.(Assuming that you actually have a problem, which isn't clear from your post. Next time, it might be a good idea to talk about any errors and to ask a question.)
> Maybe using \\ as a path divider would help here. I
> don't know how Windows reacts on the slash.
> ...
No need: Windows handles the / as a path divider just fine.
@OP: Are you the same as the person in this thread: http://forum.java.sun.com/thread.jspa?forumID=54&threadID=5187943 ?
> ...
> @OP: Are you the same as the person in this thread:
> ...
Never mind you must be.
All you need is in the File class:
http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html
and especially this method:
http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html#listFiles()
which will return an array of File objects which represent the file and directory listing of a particular folder (use it on you F:/ folder!). Iterate over that array and if you encounter a directory (use File's isDirectory() method) you can inspect that directory for the existence of your pps file.