• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Windows File Paths

 
Scott Selikoff
author
Saloon Keeper
Posts: 4020
18
Eclipse IDE Flex Google Web Toolkit
  • 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 ]
 
Joel McNary
Bartender
Posts: 1840
Eclipse IDE Java Ruby
  • 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
Saloon Keeper
Posts: 4020
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe I made a mistake debugging/testing, I'll try it again.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic