对于计算机而言,文件是一条信息。它可以由操作系统或单个程序访问。该名称来源于办公室使用的物理纸质文件。由于计算机文件具有相同的用途,因此它们被称为相同的名称。它也可以被认为是存储数据的计算机对象。如果您使用的是GUI系统,文件将显示为图标。您可以双击一个图标来打开相应的文件。
什么是计算机文件?
计算机(Computer)文件的格式可能不同。类型相似(存储的信息)的文件被称为具有相同的格式。作为文件名一部分的文件扩展名将告诉您其格式。不同类型的文件有——文本文件、数据文件、二进制文件、图形文件等……分类是基于文件中存储的信息种类。
文件也可以具有某些属性。例如,如果文件具有只读属性,则不能将新信息附加到文件中。文件名也是它的属性之一。文件名表示文件的内容。所以,最好有一个有意义的名字。但是,文件的名称绝不会影响文件的内容。
计算机(Computer)文件存储在各种存储设备上——硬盘驱动器、光驱等……文件的组织方式称为文件系统。(How)
在一个目录中,不允许有 2 个同名文件。此外,命名文件时不能使用某些字符。以下是文件名中不接受的字符 – /、、<、>、:、*、?、|。此外,命名文件时不能使用某些保留字。文件名后跟其扩展名(2-4 个字符)。
每个操作系统都有一个文件系统来为文件中的数据提供安全性。文件(File)管理也可以手动完成,也可以借助第三方工具完成。
有一组可以对文件执行的操作。他们是:
- 创建文件
- 读取数据
- 修改文件内容
- 打开文件
- 关闭文件
文件格式(File formats)
如前所述,文件的格式表示它存储的内容类型。图像文件的常见格式是JPEG、JPG、PNG。文本文档可能具有扩展名 docx 或 txt。音频文件通常属于 wav 和 mp3 等格式,而 mp4 是视频文件携带的扩展名。某些(Certain)文件以压缩格式存储。zip 文件包含其他文件和文件夹。但是,它仍被视为单个文件。ISO 文件(ISO file)用于保存在磁盘上找到的信息。它是物理磁盘的表示。这也被视为单个文件。
文件可以从一种格式转换为另一种格式吗?(Can a file be converted from one format to another?)
可以将一种格式的文件转换为另一种格式。当软件不支持以前的格式或您想将文件用于其他目的时,会执行此操作。例如,PDF阅读器无法识别 doc 格式的文件。要使用PDF(PDF)阅读器打开它,必须将其转换为PDF格式。如果要在 iPhone 上将 mp3 音频设置为铃声,则必须先将音频转换为m4r,以便 iPhone 将其识别为铃声。
许多免费的在线转换器将文件从一种格式转换为另一种格式。
创建文件(Creating a file)
创建是用户对文件执行的第一个操作。使用计算机上预装的软件创建一个新的计算机文件。(Computer)例如,如果要创建图像文件,则使用图像编辑器。同样,您需要一个文本编辑器来创建一个文本文件。创建文件后,必须保存。您可以将其保存在系统建议的默认位置,也可以根据您的喜好更改位置。
另请阅读:(Also Read:) 文件系统到底是什么?(What Exactly Is a File System?)
为了确保现有文件以可读格式打开,它只能通过支持的应用程序打开。如果您无法确定合适的程序,请记下其扩展名并在线参考支持该特定扩展名的程序。此外,在Windows中,您会收到“打开方式”提示以及可能支持您的文件的可能应用程序列表。Ctrl+O是打开文件菜单并让您选择要打开的文件的键盘快捷键。
文件存储(File storage)
存储在文件和文件夹中的数据按层次结构进行组织。文件存储在从硬盘驱动器到磁盘(DVD和软盘)的各种介质上。
文件管理(File management)
Windows 用户可以使用Windows 资源管理器(Windows Explorer)来查看、组织和管理文件。现在让我们看看如何对文件执行基本操作,例如复制、移动、重命名、删除和列出目录/文件夹中的文件。
1. Obtaining a list of files by directory/folder
打开Windows Explorer/Computer,转到 C: 驱动器。您可以在此处找到主硬盘驱动器根目录中的文件和文件夹。在程序文件文件夹或我的文档中搜索(Search)您的文件,因为这些是可以找到大多数程序/文档的 2 个常用文件夹。
2. 复制文件(2. Copying files)
复制文件将创建所选文件的副本。转到需要复制的文件/文件夹。通过用鼠标单击它们来选择它们。要选择多个文件,请按 shift 或 ctrl 键。您还可以在需要选择的文件周围画一个框。右键单击并选择复制。Ctrl+C是用于复制的键盘快捷键。复制的内容将存储在剪贴板中,您可以将文件/文件夹粘贴到您选择的位置。再次(Again),右键单击并选择粘贴或使用键盘快捷键Ctrl+V粘贴复制的文件。
由于同一目录中的两个文件不能具有相同的名称,因此重复文件将具有带有数字后缀的原始名称。例如,如果您制作了名为 abc.docx 的文件的副本,则副本的名称将是 abc(1).docx 或 abc-copy.docx。
您还可以在Windows 资源管理器(Windows Explorer)中按类型对文件进行排序。如果您只想复制某种类型的文件,这将很有帮助。
3.移动文件和文件夹(3. Moving files and folders)
复制(Copying)不同于移动。复制时,您复制选定的文件,同时保留原始文件。移动意味着同一个文件被移动到不同的位置。该文件只有一个副本——它被移动到系统中的不同位置。有几种方法可以做到这一点。您只需将文件拖放到新位置即可。或者您可以剪切(快捷键Ctrl+X)并粘贴。另一种方法是使用移动到文件夹命令。选择文件,单击编辑(Edit)菜单并选择移动(Move)到文件夹选项。将打开一个窗口,您可以在其中选择文件的新位置。最后,单击移动(Move)按钮。
4.重命名文件(4. Renaming a file)
可以使用不同的方法更改文件的名称。
- 选择文件。右键单击并选择重命名(Rename)。现在,输入新名称。
- 选择文件。按 F2(Press F2)(某些笔记本电脑上为Fn+F2)。现在输入新名称。
- 选择文件。从窗口顶部的菜单中单击文件(Click)。(File)选择重命名。
- 单击(Click)文件。等待(Wait)1-2 秒,然后再次单击。现在输入新名称。
- 删除文件
推荐:(Recommended:) 什么是 Windows 更新?(What is Windows Update?)
同样,有几种删除文件的方法。另外,请记住,如果您删除一个文件夹,该文件夹中的所有文件也会被删除。这些方法如下所述。
- 选择要删除的文件,然后按Delete键。
- 选择文件,单击鼠标右键,然后从菜单中选择删除。
- 选择文件,单击顶部菜单中的文件。点击(Click)删除。
概括(Summary)
- 计算机文件是数据的容器。
- 文件存储在各种媒体上,如硬盘、DVD、软盘等……
- 每个文件都有一种格式,具体取决于它存储的内容类型。格式可以通过作为文件名后缀的文件扩展名来理解。
- 可以对文件执行许多操作,例如创建、修改、复制、移动、删除等。
What is a Computer file? [EXPLAINED]
With respect to computers, a file is a piece of information. It can be accessed by the operating ѕystem or іndividuаl programs. The name is derived from the physical paper documents that were usеd in offices. Sincе computer fіles ѕerve the same рurpose, they are called by the same name. It cаn also be thought of as a computer objеct that stores dаta. If you are υsing a GUІ system, files wіll be displayed as icons. You can double click on an іcon to open the corresponding file.
What is a Computer file?
Computer files can vary in their format. Files that are similar in type (of information stored) are said to be of the same format. The file’s extension which is a part of the filename will tell you its format. The different types of files are – text file, data file, binary file, graphic file, etc…The classification is based on the kind of information stored in the file.
Files can have certain attributes too. For example, if a file has a read-only attribute, new information cannot be appended to the file. The filename is also one of its attributes. The filename signifies what the file is about. So, it is better to have a meaningful name. However, the name of the file in no way affects the file’s contents.
Computer Files are stored on various storage devices – hard drives, optical drives, etc… How files are organized is called the file system.
Within a directory, 2 files with the same name are not allowed. Also, certain characters cannot be used while naming a file. The following are the characters that are not accepted in a filename – / , \, <, >, :, *, ?, |. Also, certain reserved words cannot be used while naming a file. The name of the file is followed by its extension (2-4 characters).
Every OS has a file system in place to provide security to data in the files. File management can also be done manually or with the help of third-party tools.
There is a set of operations that can be performed on a file. They are:
- Creating a file
- Reading data
- Modifying the file content
- Opening the file
- Closing the file
File formats
As mentioned before, the format of a file signifies the kind of content it stores. The common formats for an image file are JPEG, JPG, PNG. Text documents may have the extension docx or txt. Audio files usually belong to formats such as wav and mp3 while mp4 is an extension that video files carry. Certain files are stored in a compressed format. A zip file contains other files and folders. However, it is still considered a single file. An ISO file is used to hold information found on a disk. It is a representation of a physical disk. This is also considered as a single file.
Can a file be converted from one format to another?
It is possible to convert a file in one format to another. This is done when the previous format is not supported by a software or if you want to use the file for a different purpose. For example, a file in doc format is not recognized by a PDF reader. To open it with a PDF reader, it has to be converted to PDF format. If you want to set an mp3 audio as a ringtone on your iPhone, the audio has to be first converted to m4r so that the iPhone recognizes it as a ringtone.
Many free online converters convert files from one format to another.
Creating a file
Creation is the first operation the user performs on a file. A new Computer file is created using a pre-installed software on the computer. For example, if you want to create an image file, an image editor is used. Similarly, you would need a text editor to create a text file. After creating the file, it has to be saved. You can either save it in the default location suggested by the system or change the location according to your preference.
Also Read: What Exactly Is a File System?
To make sure that an existing file opens in a readable format, it has to be opened only through supporting applications. If you are not able to ascertain a suitable program, take note of its extension and refer online for programs that support that particular extension. Also, in Windows, you get an ‘open with’ prompt along with a list of possible applications that may support your file. Ctrl+O is the keyboard shortcut that will open the file menu and let you choose which file to open.
File storage
Data stored in files and folders are organized in a hierarchical structure. Files are stored on a variety of media ranging from hard drive to disk (DVD and floppy disk).
File management
Windows users can make use of the Windows Explorer to view, organize, and manage files. Let us now see how to perform basic operations on files like – copying, moving, renaming, deleting, and listing the files in a directory/folder.
1. Obtaining a list of files by directory/folder
Open Windows Explorer/Computer, go to the C: drive. This is where you will find the files and folders in the root directory of your primary hard drive. Search for your files in the program files folder or My Documents as these are the 2 common folders where the majority of your programs/documents can be found.
2. Copying files
Copying a file will create a duplicate of the chosen file. Go to the files/folders that need to be copied. Select them by clicking them with the mouse. To select multiple files, press the shift or ctrl keys. You may also draw a box around the files that need to be selected. Right-click and select copy. Ctrl+C is the keyboard shortcut used for copying. The copied content will be stored in the clipboard and you can paste the file(s)/folder(s) in the location of your choice. Again, right-click and select paste or use the keyboard shortcut Ctrl+V to paste the copied files.
Since no two files in the same directory can have the same name, the duplicate file will have the name of the original with a numerical suffix. For example, if you make a copy of a file named abc.docx, the duplicate will bear the name abc(1).docx or abc-copy.docx.
You can also sort the files by type in the Windows Explorer. This is helpful if you want to copy files of a certain type only.
3. Moving files and folders
Copying is different from moving. While copying, you duplicate the selected file while retaining the original. Moving implies that the same file is being shifted to a different location. There is only one copy of the file– it is moved to a different location in the system. There are several methods to do this. You can simply drag the file and drop it in its new location. Or you could cut (shortcut Ctrl+X) and paste. One more way is to use the move to folder command. Select the file, click on the Edit menu and select the Move to folder option. A window opens up where you can select the new location of the file. Finally, click on the Move button.
4. Renaming a file
The name of a file can be changed using different methods.
- Select the file. Right-click and select Rename. Now, type the new name.
- Select the file. Press F2 (Fn+F2 on some laptops). Now type the new name.
- Select the file. Click on File from the menu at the top of the window. Select rename.
- Click on the file. Wait for 1-2 seconds and click again. Type the new name now.
- Deleting a file
Recommended: What is Windows Update?
Again, there are a couple of methods for deleting a file. Also, keep in mind that if you delete a folder, all the files in the folder get deleted as well. These methods are described below.
- Select the file you wish to delete and press the Delete key.
- Select the file, right-click, and select delete from the menu.
- Select the file, click on File from the menu at the top. Click on delete.
Summary
- A computer file is a container for data.
- Files are stored on various media like hard drives, DVD, floppy disk, etc…
- Each file has a format depending on the kind of content it stores. The format can be understood by the file extension which is the suffix of the filename.
- Many operations can be performed on a file such as creation, modification, copying, moving, deletion, etc.