![]() |
|
04 Sep 2018 | #1 |
|
How do I make a dot file type recognized as a text file (e.g. .args)
Hi,
I know in windows 7 you can create files without names such as ".args" or ".gitignore". I have one of each of these. ![]() My question is, how does windows know that the .gitignore file is a "Text Document" and can I make the same thing happen to my .args file? If I make the default program notepad, the icon changes to this: ![]() But windows still treats it as an "ARGS File" instead of a "Text Document". Does anyone know how to get windows to recognize custom file types as text documents and for the .txt icon to be used? Thanks. Trevor |
My System Specs![]() |
. |
|
04 Sep 2018 | #2 |
|
In simple terms Windows displays the icon for a file by what's designed to open it so if you tell Windows to open .Fred with notepad it then thinks it's a txt file. At a deeper level the headers of the file say what it is even a txt file can have different headers to say what type of txt file its and how it's encoded
|
My System Specs![]() |
05 Sep 2018 | #3 |
|
I would just install Notepad ++ then all you have to do is right click the file and open with Notepad ++ to view that file. I do this all the time with many files. I even do it with pictures to look at its headers, etc.
|
My System Specs![]() |
. |
|
07 Sep 2018 | #4 |
|
There is no such thing in Windows like a "dot file" (or there is, but aren't special in any way). Windows Explorer uses the file extension to determine the "file type". Dot files are 100% extension, so each one is technically a different type. In your case the gitignore extension has a text file type, but the args extension had none, then the useless you created with the useless "default programs" Control Panel applet. As each file has different extension, each one is a different type.
To change this, look in the registry for the appropriate entries. Go to HKEY_CLASSES_ROOT\.gitignore and look at the "(default)" value. That's its current association. Copy that value into HKEY_CLASSES_ROOT\.args into its "(default)" entry and you're done, both files will behave the same. You'll need to restart Explorer in order for the change to take effect (usually, logoff and login again). In simple terms Windows displays the icon for a file by what's designed to open it so if you tell Windows to open .Fred with notepad it then thinks it's a txt file. At a deeper level the headers of the file say what it is even a txt file can have different headers to say what type of txt file its and how it's encoded
Nitpick: It's Windows Explorer what does all this, not Windows. The OS is utterly unaware and doesn't even cares about all this ![]() |
My System Specs![]() |
09 Sep 2018 | #5 |
|
Thank you Alejandro for the in-depth analysis. Everyone else, thanks but my problem wasn't how to open the file in n++ or notepad etc, I wanted it to display nicely with the .txt icon, but the notepad icon.
|
My System Specs![]() |
12 Sep 2018 | #6 |
|
|
My System Specs![]() |
![]() |
Thread Tools | |
Similar help and support threads | ||||
Thread | Forum | |||
File couldnot open because it is either not a supported file type Hi, Good evening friends. I have been Using windows 7 for a long time for engineering design & documentation purpose for last 5-6 years, , but for last 3-4 days, i have been facing a very typical problem, when i am trying to open PDF or XLSX files stored previously, not opening by giving a... |
General Discussion | |||
Change File Associaton to Unknown File Type for .sdf file I am using Windows 10 64 bit.At first the .sdf was not associated to any file type association like notepad etc.It was coming look for an app in store.I accidentally clicked on a file type association now can't find a solution to change it back to the default one(i.e pick an app from store) and... |
Performance & Maintenance | |||
Changing .exe File Type Icons In File Explorer But Nowhere Else Hello Everyone, I have kind of an odd question, I have been looking into changing file type icons when I came across an interesting conflict. I would like to be able to change the file type icon for all .exe files to the same file type icon within a file explorer. If you were to try to do... |
Customization | |||
How do I change a file's file type (not only file association)? I need to change a zip file to an epub file. I have heard this can be done, but when I add the .epub after the file name, I notice the file is still actually zip type file when I right click properties. This is causing a problem when I try to open it in in different ebook reader programs. I... |
General Discussion | |||
How to create a batch file that will move files based on the file type How to create a batch file that will move files based on the file type? My Requirement : I need a batch file to copy all .doc files in all my HardDisk to a removable disk say (Z: drive) . Can anyone make it possible using a batch file?Please...Its urgent... |
General Discussion |
Our Sites |
Site Links |
About Us |
Find Us |
Windows 7 Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows 7" and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd All times are GMT -5. The time now is 18:35. |
![]() ![]() ![]() |