When you open a file, Windows will check the file extension and would invoke the application which is set as default for that extension, but sometimes it happens when you download email attachments or download something through torrents file extensions are messed up. Like many video files are in extension .DAT which no video player recognizes, for that you have to change the file extension.
First make sure you can see the extension of the files (e.g. fileName.jpg), if not then open up Windows Explorer and press the Alt key, and click on Folder Options via Tools menu button.
Now click on View tab and remove the check from Hide extensions for known file types, and then press OK. (This way you’d be able to see the extensions of the files).
Here we will take an example of the following folder, where there are some images with extension .jpg, and one of the file has extension .avi, meaning we assume its a video file.
When I tried opening that file with the default application for .avi which appeared to be a video file due to its extension i got an error telling me that WMP cannot play that file, VLC didn’t worked too. This means we have to change the extension as this was not a video file as assumed earlier.
Step 3: So next step is to change the extension of the file. Right-Click on the suspected file and click on Rename.
The characters before period (.) represents the name of the file, and those which are after the period defines the file’s extension, so here we would be modifying the other half, after period, which is currently avi.
After changing it from image_1.avi to image_1.jpg you’d get an error which would looks like this, giving you some warning, but click on Yes button as we know exactly what we are doing here.
Now open that file again, and if everything goes well, the file would open up, just like here in our example that image_1.jpg did.