If i have a shortcut file how can i get the original file location using File handling?
Eg: File location : C:\...Rav.txt
Desktop Shortcut: Rav.txt
now i want the location of Rav.txt i.e C:\...Rav.txt
Thanx in advance
Printable View
If i have a shortcut file how can i get the original file location using File handling?
Eg: File location : C:\...Rav.txt
Desktop Shortcut: Rav.txt
now i want the location of Rav.txt i.e C:\...Rav.txt
Thanx in advance
I;m not sure if windows shortcut files are understood by Java to resolve to the real file. In unix anyway, when we have a path to a symbolic link, doing the File.getCanonicalPath() works.
I don't have windows to test this though.
But i need it for windows is there any way of getting the properties of a file from there we can get the path