Javatpoint Logo
Javatpoint Logo

What is File?

A file a container in a computer system that stores data, information, settings, or commands, which are used with a computer program. In graphical user interface (GUI), such as Microsoft operating systems, represent the files as icons, which associate to the program that opens the file. For instance, the picture is shown as an icon; it is related to Microsoft Word. If your computer contains this file and you double-click on the icon, it will open in Microsoft Word installed on the computer.

What is File?

There are several types of files available such as directory files, data files, text files, binary and graphic files, and these several kinds of files contain different types of information. In the computer system, files are stored on hard drives, optical drives, discs, or other storage devices.

In most of the operating systems, a file must be saved with a unique name within a given file directory. However, certain characters cannot be used during creating a file as they are considered illegal. A filename is consisted of with a file extension that is also called a suffix. The file extension contains two to four characters that follow the complete filename, and it helps to recognize the file format, type of file, and the attributes related to the file.

Most modern computer systems have the ability to protect files from file corruption or damage. The file can be contained the data from system-generated information to user-specified information. File management is done manually at times with the help of the user or done with the help of third-party tools and operating systems.

The basic operations that can be performed on a file are given below:

  • Closing or terminating a file operation
  • Creation of programs
  • Reading of data from the file
  • Creation of a new file
  • Opening the file in order to make the contents available to other
  • Modification of data or file attributes
  • Writing data to the file

How are the files created?

A software program helps to create a file on the computer. For instance, to create a document file, you will use a word processor, to create a C programming file, you would use a C software, to create an image file, you would use an image editor. Specific software is used to create a particular file.

Where are files stored?

Computer files are stored on a hard drive, disc-like DVD, and floppy disk. It can also be stored in a folder that is stored on the drives.

Illegal file characters

The given below characters are considered illegal with most operating systems, hence cannot be used. If you try to create a file name with these characters, it would generate an error or make the file inaccessible.

File management

File management is also referred to as a file system that is a process of creating an organized structure and retrieving files from a storage medium such as a hard drive. It is a type of software that usually comprise files separated into groups, which is called directories. Basically, it is designed to handle individual or group files, like records and special office documents. It is able to display report details, such as creation date, state of completion, owner and more other similar details, which are useful in an office environment.

Nowadays, NTFS (New Technology File System) is the most widely used file system with Windows. All files cannot be organized without file management, and it would be impossible to be the same name for a file. Often, files are managed in a hierarchical way that allows users to view files in the current directory and then navigate into any subdirectories.

File Format

The file format is the structure of a file that arranges the data logically within a file. It allows a program to represent the information correctly, retrieve data, and continue with processing. For instance, a Microsoft Word document will be saved with .doc file format; it will be best viewed in Microsoft Word software. Although another software can open this file, it may not have all features to display the document properly, like Microsoft Word. The programs may be able to give an overview of a file if they are compatible with the file format. But they may be unable to display all the files features.

Additionally, some of the programs that are not supported with a file format maybe give you garbage with opening a file. For example, if you will open a.XLS file in another program like notepad, it will not display the document properly and give you garbage. A file format minimizes the required storage space as it contains the data encoding process. For instance, video and picture are encoded by embedded processes like compression; in this process, a picture is divided into pixels.

Furthermore, it also includes presentation information. For example, a Microsoft .xls file includes both the document's text and its final form, as well as table, color, calculations, font size, charts, and other information that must be organized in a standard form inside the file.

What is File?

Common file formats

Below is a table that contains common file formats you are most likely to see while working on a computer.

File type File extension
Image .bmp .eps .gif .jpg .pict .png .psd .tif
Text .asc .doc .docx .rtf .msg .txt .wpd .wps
Video .avi .mp4 .mpg .mov .wmv
Compressed .arc .arj .gz .hqx .rar .sit .tar .z .zip
Program .bat .com .exe
Sound aac .au .mid .mp3 .ra .snd .wma .wav

File Extension

A file extension is an identifier that helps identify the type of file in operating systems, such as Microsoft Windows. It can be classified as a type of metadata, and it helps the operating systems to understand the intended use of a file and the characteristics. The filename extension may be contained one to four characters and used as a suffix to the file name. For example, in Microsoft Windows, the file extension is often followed by three characters.

What is File?

A dot (.) symbol is used to separate the file extension from the filename. The filename is considered incomplete without file extension; therefore, to complete a filename, it must be included in the file extension. Generally, file extensions are hidden from the users in Windows operating systems. Although file extensions can be renamed, it is not necessarily by renaming a file extension will convert one file format to another. File extensions are helpful for both users and the file system in two ways:

  1. It helps in identifying the type of data that a file hold.
  2. It allows the operating system to select the proper program or application with which to open a file.

What makes a valid file name extension?

A filename extension is always at the end of the file name, which starts with a period (After dot symbol). Although it is often between one and three characters, some of the programs also support more than three characters. For instance, in the latest versions of Microsoft Word file will be saved with .docx extension and some web pages with .html file extension.

Can be a file extension more than three or four characters?

Yes, a file extension can be more than three or four characters. It depends on the program of how it was designed. Some of the programs are designed to identify and open a program with a longer (more than three or four characters) file extension. However, most programs do not exceed four characters to keep the overall file name short.

Limit of a file extension

Until the file name, path, and extension are not combined, the limit of file extension does not exceed the limit of the maximum file name character. There is given a list below, which contains Microsoft operating systems (Windows) versions and their filename character limit.

  • Windows XP: It contains a limit of 255 characters.
  • Windows 7: It includes a limit of 260 characters.
  • Windows 2000: Its limit is 254 characters.
  • Windows Vista: Its limit is 260 characters.
  • Windows 8: It includes a limit of 260 characters.
  • Windows 10: It contains a limit of 260 characters.

Different types of file extension

There are various types of file extensions that can be connected with one or more applications. Below is given a list that contains some of the more common file extensions and their related programs.

Music and sound files


Picture files


Text and word processing documents


Operating system files


Web Page files


Spreadsheet files


File Compression

File compression is also known as file zipping. It is a data compression method that contains one or more files or directory that is smaller than their original file size. It is used to reduce the file size to save storage space and provide faster transmission over a network or the Internet. The compressed files allow more data to be stored on removable media and make downloading faster. The common types of compressed file extensions are .RAR, .ARJ, .ZIP, TGZ, and.TAR.GZ.

What is File?

The process of file compression is completed with the help of data or file compression software, which processes all files and creates a compressed version. Generally, it scans an entire file, recognizes repetitive patterns and data and replaces duplicates with a unique identifier. The size of the created file of the identifier is much smaller as compared to the original file. Although there is no fixed size of the compressed file, it reduces the size by 50 to 90 percent of the original file while compressing the file.

There are various types of compressed file extensions, below is a table that contains some common types of compressed file extensions:


How to copy files

A file name must be unique; if you copy a file with the same file name in the same directory or folder, a number will be appended to the end of a file name. Instead of a number, it could be '- Copy' added to the end of the file name. For example, a file name is smith.doc, and it is copied in the same directory or folder, the copied file name may be snkh143(1).doc or snkh143 - Copy.doc.

Although it is very easy to copy computer documents from one location to another. To copy files, follow these below steps:

Copy a file in Microsoft Windows

  • First, go to the files or folders that you want to copy, then select them with the help of clicking the mouse. If you want to copy more than one file, you need to select all files. You can highlight more than one file by holding down the Ctrl or Shift keys on your keyboard and clicking the mouse together.
  • After selecting the files, you are required to right-click on the selected files and choose the copy option from the opened list. You can also press the Ctrl+C shortcut key. Also, in Windows Explorer, you can click on the edit option at the top of the program window and select copy.
  • Now, you need to open the destination folder where you want to copy the files, and right-click an empty space in the destination folder and select the paste option.

How to move files or folders on the computer

There are numerous methods to move files, folders or directories from one location to another on the computer.

Move a file in windows

In Windows, files can be moved by using different methods such as cut and paste, drag-and-drop, or using the move to folder option. Below all methods are described through which you can move the files easily. You can choose any method accordingly.

  • Cut and paste method
    To use the cut and paste method, first, you are required to select the file that you want to move. Then, right-click on the selected file and choose the cut option from the opened list. Now, open the destination folder where you want to move the file and right-click on the empty space in the folder and select the paste option from the list that appeared.
    On the other hand, select the file and click on the Edit option from the file menu and select the Cut option. Then, browse the folder where you want to move the files and click on the Edit option from the file menu and select the Paste option to move the file.
    Alternatively, you can also use shortcut keys to move the files. For that, you are required to highlight the file that you want to move, then press the shortcut key Ctrl+X. Now, browse the folder where you want to move the files and press the shortcut key Ctrl+V to paste the files.
  • Drag-and-drop method
    First, you are required to select the files that you want to move, then hold down the right mouse button on the file, and drag the files while continuing to hold down the right mouse button, and release the mouse button on the location where you want to move the files.
  • 'Move to folder' method
    Highlight the file by clicking on the file name, then click on the Edit from the file menu and click the Move to Folder option. In the new window, browse the folder in which you want to move the files, then you only need to click on the move button to move the file to the browsed folder.

Next Topic#

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA