In windows, the characters after the dot in a filename give you a clue what the file contains: e.g. something.html contains HTML (Hypertext Markup Language), *.txt is simple text, *.exe is an executable, *.java is Java source. Each of these extension is associated with a MIME (Multipurpose Internet Mail) type which is a long winded way of saying the same thing. You can associate given extensions with certain apps so that when you double click a file the corresponding program that knows how to deal with that file type is automatically launched with that file.
File offers no built-in way to get the extension or the filename without extension. Here is how you do it:
|
|
You can get the freshest copy of this page from: | or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror) |
| http://mindprod.com/jgloss/extension.html | J:\mindprod\jgloss\extension.html | |
![]() | ||
| Canadian Mind Products | ||
| mindprod.com IP:[65.110.21.43] | ||
| view Blog | Your face IP:[38.107.179.210] | |
| Feedback | You are visitor number 11,252. | |