Results 1 to 3 of 3
  1. #1
    ravjot28 is offline Member
    Join Date
    Jun 2008
    Posts
    87
    Rep Power
    0

    Default Getting to original File location

    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

  2. #2
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    684
    Rep Power
    6

    Default

    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.

  3. #3
    ravjot28 is offline Member
    Join Date
    Jun 2008
    Posts
    87
    Rep Power
    0

    Default

    But i need it for windows is there any way of getting the properties of a file from there we can get the path

Similar Threads

  1. how to specify location of file to be uploaded?
    By anthrax in forum New To Java
    Replies: 11
    Last Post: 01-13-2010, 02:48 PM
  2. File Location
    By bcbird in forum New To Java
    Replies: 1
    Last Post: 09-17-2009, 08:03 AM
  3. Replies: 5
    Last Post: 07-26-2009, 03:37 PM
  4. Transferring a .txt file from 1 location to another
    By dbashby in forum New To Java
    Replies: 2
    Last Post: 04-15-2009, 05:22 AM
  5. Java logging - log file location for FileHandler
    By kfir.wolfson@gmail.com in forum Advanced Java
    Replies: 2
    Last Post: 03-24-2009, 08:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •