Home > Common Problem > body text

The operating system distinguishes file types based on what is in the file

WBOY
Release: 2022-07-22 14:06:43
Original
10744 people have browsed it

The operating system distinguishes file types based on the "extension" of the file; the file extension is a mechanism used by the operating system to mark the file type. The more important role of the extension is to let the system decide which file type to use. Which software should the user use to open this file?

The operating system distinguishes file types based on what is in the file

The operating environment of this tutorial: Windows 10 system, DELL G3 computer.

The operating system distinguishes file types based on what the file is

The operating system distinguishes file types based on the "extension" of the file

A mechanism used by the operating system to mark file types

The file extension (Filename Extension, or extended file name, suffix name) is an early operating system (such as VMS/CP/ M/DOS, etc.) is a mechanism used to mark file formats.

In a file name like "example.txt", example is the file main name, txt is the file extension, indicating that the file is a plain text file, and the period "." is the file main name and file extension. Name delimiter.

The more important role of the file extension is to let the system decide which software to use when the user wants to open the file.

The operating system distinguishes file types based on what is in the file

Main purpose introduction

Protection is important File

For some files (such as DOC, etc.), we do not want others to open them at will. The simplest protection method is to change its extension to another name, such as changing the ".xls" extension to ".cqq", etc. In this way, when you double-click the ".cqq" file, it cannot be opened directly, allowing Others mistakenly thought it was a document of unknown origin and gave up their interest in it. When we run it, we only need to adjust the association status to open it smoothly. For example, you can use Notepad to edit a batch file whose contents include the lines "assoc .xls= Excel.Sheet.8" "ping 127.0.1 –n 10" "assoc .xls=cqq". Then save it as an "open.bat" file. The batch process is simple. The first line uses the "assoc" command to set the correct association for the ".XLS" file. If you want to view the association of files of a specified type, you can execute the "assoc .xxx" command in the CMD window, where "xxx" represents the specific file extension.

The second line uses the Ping command to detect the local IP. The "-n" parameter specifies the number of detections. Generally speaking, one detection takes about 1 second. It takes 10 seconds to detect 10 times here. Of course, you can It depends on the actual situation. Note that "127.0.1" here also represents the local address, which is equivalent to "127.0.0.1". The third line re-associates the ".xls" type to our custom type. First modify the extension of the file that needs to be protected, for example, rename "wendang.xls" to "wendang.cqq". In this way, others cannot open it directly. When we need to use it, we can run the "open.bat" file and double-click the "wendang.cqq" file within the specified time interval to open it smoothly. The batch process will then automatically modify the file association status to prevent others from manipulating the file at will.

Of course, for security reasons, it is best to create a new account in the system (such as "gly", etc.) and set a complex password for it. Store the batch file in the NTFS partition, click the "Add" button in the "Security" panel in its properties window, add the "gly" account, and click the "Delete" button to delete the "Group or User Name" other groups and accounts in the column. If some accounts cannot be deleted, you can click the "Advanced" button, cancel "Inherit from parent those permission items that can be applied to child objects" in the "Permissions" panel in the pop-up window, and click the "Delete" button in the pop-up dialog box , you can clear all accounts. Select the "gly" account and check the "Full Control" item in the permission list, so that only the "gyl" account can operate the batch file.

For general extensions, we can clearly know the file type, but for uncommon extensions or files without extensions, it is not that simple to identify their true identity. Using the small tool FileTypeID, the problem can be easily solved. FileTypeID can identify thousands of file types. Run the program, drag and drop files of unknown types directly into the main interface of the program, and click the "Details" button to display the detailed information of the file, as shown in Figure 1. Click the "Analyze" button, and the file type to which the file may belong is displayed in the "Extension" column in the identification list, the probability of matching the file type is displayed in the "Match" column, and the file type is displayed in the "Type" column. Type description information. Based on this information, it is not difficult to discover its true identity.

In addition, when encountering files of unknown types, you can also use search engines such as Baidu to find the corresponding information. In Windows 8, the processing method is much simpler. After double-clicking a file of unknown type, click "More Options" in the pop-up panel to display all programs in the system that can process the file. After selecting the target program, check the item "Open all XXX files with this application", then you can use the program to open the file. Otherwise, you can click the "Find the application in the App Store" item, which can be easily found in the App Store. Quickly find the application corresponding to the file format, select the corresponding application item, view its description information, and if appropriate, download and install the application. [2]

Generally speaking, no matter what type of file, a specific identifier will be displayed at the beginning of it. For example, for EXE files, the identifier is "MZ". Use tools such as Notepad or WinHex to open the target file, find the identification information at the beginning of it, and then search online to learn the specific file type. In addition, using the software "Translate Extension", you can easily identify the actual file type. Enter the file extension in the upper right corner of its main interface and click the query button to quickly find the relevant description information and learn about its actual type. "Translate Extension" supports 6113 file types. For some special file types, if they cannot be recognized, you can click the "Submit" button to send them to the author for screening.

Save disk space

You can search for all .scr files in the system (type *.scr and then search), and delete unnecessary .scr files in the search results window files to save disk space. If you want to start the screen saver immediately, right-click on any of the .scr files and drag it to the desktop or the Start menu (or one of its submenus) and select "CreateShortcut". Then click this Shocrtut to start the screen saver.

Clear icons on the control panel

Sometimes these unwanted icons are not carried by the Windows system control panel itself, but by some other programs without permission installed. In this case, it is necessary for the reader to understand that the file extension of most control panel icons is .cpI. Type *.cpI in the Windows system search function to list applications related to the control panel in the system. Then double-click each listed file and filter out unnecessary files. Move these unwanted files to another folder or make a backup, and delete the original icon files. It is worth noting that sometimes multiple icons in the control panel may only represent one .cpl file. For example, if the main·cpl file is deleted, the keyboard, mouse, and printer icons will be deleted.

Setting Association

In Windows Control Panel-Default Programs-Setting Association, you can find almost all file types of this Windows. You can find the name, description and Associated program (current default).

For more related knowledge, please visit the FAQ column!

The above is the detailed content of The operating system distinguishes file types based on what is in the file. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template