IgnoreCase filename
File f =new File("f:/myfile.pps");
if(f.exists()){
Runtime.getRuntime().exec(new String[]{"cmd /c start","f:/myfile.pps"});
}
how can i make the code such that it will also execute the file although the filenamemyfile.pps is saved in capital letters?
thank you.
[588 byte] By [
sarah007a] at [2007-11-27 11:22:25]

> File f =new File("f:/myfile.pps");
> if(f.exists()) {
> Runtime.getRuntime().exec(new String[] {"cmd /c start", "f:/myfile.pps"});
> }
>
> how can i make the code such that it will
> also execute the file although the filename
> myfile.pps is saved in capital letters?
> thank you.
It depends what OS you're using: Windows doesn't care if there's myfile.pps, MYfile.PpS, myfile.ppS, ... on F:\. They are all the same. On *nix, they're all different.
hi, thanks for the guide, i'm using Windows platform and the file is able to execute though the filename is caps lock, thank you :)