If you are talking about a file stored locally on your own computer and you are typing the address into the address bar of the browser then you need to use file:///C:/ followed by the path to the file.
If you type http://fred/ or even just fred/ then IE should see that the address is complete and should not go adding the .com on the end.
The alternative is to switch to using a different browser where the option to turn off the automatic adding of TLDs is easier to find.
If you really want to turn it off in IE then you need to edit the registry to do it. The key you want is HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet
Explorer\Main\UrlTemplate where you will then find four entries for trying the address with .com .org .net and .edu on the end.
IE is adding .com because when the computer looks up "fred" either first as a NetBIOS name, then local DNS cache, then DNS server, etc. If nothing is found for "fred" it adds .com, as an auto correction in case the user forgot to add it. As long as IE can find an entry for "fred" that points to an IP, it will not auto correct.
Logic without the fatal effects.
All code snippets are licensed under WTFPL.