• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

Windows File Paths

 
author
Posts: 4229
33
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a quick way in java to determine if two file paths are equivalent on a windows based system if their format is different such as:

C:\Program Files\MyFile.exe
C:\PROGRA~1\MyFile.exe

I've tried using File getCanonicalPath() but it didn't work.
[ September 19, 2006: Message edited by: Scott Selikoff ]
 
Bartender
Posts: 1840
Eclipse IDE Ruby Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I didn't have a "MyFile.exe" to test it out with, but this worked. (Java 1.4.2_04)
 
Scott Selikoff
author
Posts: 4229
33
jQuery Eclipse IDE Java
 
A "dutch baby" is not a baby. But this tiny ad is baby sized:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic