The operating system searches for a file in a directory by its full name. This means that in principle there cannot be two different files with the same name in the same directory or subdirectory . We remind you that the name consists of the file name and its extension. It is also not allowed to have two nested subdirectories with the same names in one directory or subdirectory.

Directories or subdirectories are allowed to have files or child subdirectories with the same name. But then, to clearly indicate required file The file name is not enough. In order to distinguish files with the same name, it is also necessary to indicate the subdirectories in which they are located. But in the general case, you need to specify not just one subdirectory, but the entire chain of subdirectories, which must be followed from the root directory to the subdirectory containing the file you are looking for in order to get to the desired file and determine its location.

The chain of names of subdirectories that need to be traversed, starting from the root directory and ending with the subdirectory containing the file, is called byor routeto file.

In MS DOS and Windows operating systems, the root directory in the path is indicated by the \ character. The same symbol separates the names of subdirectories in the chain from each other, as well as the file name from the name of the subdirectory in which it is located. This symbol is called back slash.

Thus, for files located in the root directory (see Figure 3.3), the path is only the root directory designator \, and the files are specified as follows:

The file in the user1 subdirectory has the path \user1:

\user1\picture.bmp.

And the path to files from the kontakti subdirectory must include the names of both subdirectories - \user1\kontakti:

\user1\kontakti\ivanov.doc,

\user1\kontakti\postavki.txt

Paths can be specified not only for files, but also for subdirectories. So, for the kontakti subdirectory the path is \user1.

Since your computer includes several different disk devices, to uniquely identify a file, you must specify which device it is located on. This can be done by specifying the name of the disk device containing the file. The name of the device is usually placed before the path to the file. Full file name (file specification) contains

ü device name,

ü path to the file,

ü file name.

<имя носителя>\<имя каталога-1>\...\<имя каталога-N>\<собственное имя файла>.

If, for example, a directory whose structure is shown in Fig. 3.3 is located on the C: hard drive, then the full specification of the postavki.txt file looks like:

C:\user1\kontakti\postavki.txt

If this directory is located on a floppy disk, that is, on disk device A:, then the specification will be written as follows:

A:\user1\kontakti\postavki.txt

A complete file specification completely and unambiguously identifies the desired file, which is what the operating system requires in order to accurately execute user commands. If the slightest mistake is made in the file specification entry, say, at least one character is missing or distorted, the operating system will not be able to find such a file.

There are three main types of files:

The system recognizes only these types of files. However, the operating system also uses many derived file types

Files whose names begin with a dot are called hidden files or "dot" files. You can also see such files using a graphical file manager, such as Nautilus, and from the command line shell. IN Nautilus select EditPreferences. In the window that appears, in the tab View select Show hidden files(ShowHiddenFiles). IN command line Use the ls -al command to view the contents of the directory. As you look through the hidden files in your home directory, you may be surprised by the number of them. These hidden files are usually application configuration files. They are hidden to prevent them from being accidentally changed and to avoid cluttering the home directory browsing window.

File types:

Batchfile - Same as a batch file. C will win commands operating system

Binaryfile - Contains data or commands in binary form

Commandfile - Contains operating system commands

Datafile - Contains data

Directoryfile (Directory file) - Contains information about the files located in the directory

Executablefile - Contains a program or commands in an executable format

Libraryfile - Contains functions in object format

Mapfile - Contains a program map

Objectfile - Contains the program code (function) after compilation

Textfile (Text file) - Contains text (that can be read); it might

be a file that is created by a text editor or any file in ASCII format.

File path:

The file system is built from ordinary files, symbolic links and directories. These components provide a way to organize, find, and manage information.

Ordinary files are a set of characters stored on disk. They can store texts or programs or program codes.

Special files correspond to physical devices (for example, a terminal or a disk).

A symbolic link is a file that points to another file.

A directory contains the names of other directories (called subdirectories) or files. All directories and files are organized into three separate structures. In this hierarchy, files and directories that have subordination are called relationships.


This type of relationship is possible for many levels of the hierarchy of files and directories.

Full file name:

Full file name(full path to file) in Windows systems consists of a drive letter, followed by a colon and a slash (backslash), then subdirectories are listed through backslashes, and the file name is written at the end. The string is terminated with a NULL character. Example:

C:\Windows\System32\calc.exe

on *nix systems, the full path consists of a slash (/), indicating the root directory, followed by subdirectories separated by slashes, and the file name is written at the end. Example:

/usr/local/bin/gcc

The file name consists of two parts separated by a dot:

Name (before the dot, often also called the name);

Extension (optional part).

The full file name (including extension) in Windows can contain up to 260 characters, this value is defined by the MAX_PATH constant in the Windows API; for example, the maximum allowed full file name on drive C would be “C:\<256 символов>NULL". However, Unicode versions of some functions allow file names of up to 32,000 characters, such names starting with the prefix "\\?\". Example:

\\?\C:\Windows\System32\calc.exe

When using the prefix "\\?\" you must specify an absolute path to the file; relative paths are not allowed. When using relative paths, the maximum fully qualified file name is limited by the MAX_PATH constant (260 characters).

In Windows, the use of some service characters in the file name is prohibited: “\”, “/”, “:”, “*”, “?”, “””, “<», «>", "|". On Linux, these characters, except "/", are legal, although they should be used with caution as some of them may have special meanings and for compatibility reasons with other operating systems.

The name of the file (before the dot) should be given a meaningful name, indicating the purpose of the file, in order to avoid confusion in the future.

File managers.

File manager(English) filemanager) - computer program, which provides a user interface for working with the file system and files. The file manager allows you to perform the most common operations on files - creating, opening/playing/viewing, editing, moving, renaming, copying, deleting, changing attributes and properties, searching for files and assigning rights. In addition to the basic functions, many file managers include a number of additional features, for example, such as working with the network (via FTP, NFS, etc.), backup, printer management, etc.

There are different types file managers, For example:

Navigation and spatial - sometimes switching between these modes is supported.

Double-panel - in general, they have two equal panels for a list of files, a directory tree, etc.

To use presentation previews, create an account for yourself ( account) Google and log in: https://accounts.google.com


Slide captions:

State budgetary professional educational institution of secondary vocational education of the Moscow region "Krasnogorsk College" Shchelkovsky branch "Master of digital information processing" MDK 01.01 "Technology for creating and processing digital multimedia information" File and file system» Teacher: Marienkova Elena Vasilievna

Objectives: Educational: introduce the concepts of file, folder, file system, file name, file path. Developmental: developing the ability to compose a file system tree; developing the ability to track the path through the file system; development of cognitive interests, self-control, and note-taking skills. Educational education information culture, attentiveness. Equipment: Personal computer; multimedia projector and screen; This presentation can be used in the lessons “Informatics”, “ Information Technology»

A file is a certain amount of information (program or data) that has a name and is stored in long-term (external) memory.

The file name consists of two parts separated by a dot. file name and extension Doclad.txt File name – set by the user Extension – usually set automatically by the program when it is created

In MS-DOS, the file name is 8 letters, and the extension is 3 Latin letters, for example: proba.txt In Windows, the file name is up to 255 characters, and you can use the Russian alphabet, for example: Units of information.doc

File extension table File type Extension examples System file drv , sys Text file txt, rtf, doc, docx , odt Graphic file bmp, gif, jpg, tif, png, pds Web page htm, html Sound file wav, mp3, midi, kar, ogg Video file avi, mpeg zip archive, rar Spreadsheet xcl , ods Program code (text) bas, pas

The file structure is the entire set of files on the disk and the relationships between them. There are two types of file structures: single-level and hierarchical

Directory is a list of files indicating their location on the storage device. The top-level directory is called the root directory. The root directory is indicated by a Latin letter followed by a colon C: D: The directory in which the user is currently located is called the current directory.

File path The logical drive name, file path, and file name written in sequence form the full file name. C:\basic\prog123.bas C:\Music\Picnic\Hieroglyph. mp3

Rules for creating a file name You are allowed to use up to 255 characters. It is allowed to use characters from national alphabets. It is allowed to use spaces and other previously prohibited characters, with the exception of the following \: /\:*?"|. You can use several dots in the file name. All characters after the last dot are considered the name extension.

Actions with files Actions with files, such as “create”, “save”, “close”, can only be performed in application programs (“Notepad”, “Paint”, ...). The actions “open”, “rename”, “move”, “copy”, “delete” can be performed in the system environment.

A file name mask is a combination of special characters that makes it easy to mass select files based on some common characteristics. To select files by mask, the following characters are used: “?” - one arbitrary character “*” - a set of arbitrary symbols

Select all mp3 files Mask: *.mp3 Selection result: song.mp3, song.mp3 Select all files that include the word "course book" Mask: * course book *.* Selection result: my-course book.doc, course book-2015.txt Select all "cursive" files, ignoring the first character and extension Mask: ? coursebook.* Sampling result: 1coursebook.doc, kcoursebook.txt

Tasks: 1. Write down the full path to the file. 2. Determine the full file name. 3.Define a file name mask.

1. Write down the full path to the file. A directory tree is presented, write down the full path of each file.

2. Specify the full filename. The file, whose full name was C:\txt\test_1.C, was saved in the work subdirectory of the root directory of the D: drive. What is the full name of the saved file? D:\work\test_1.D D:\work\txt\test_1.C D:\txt\work\test_1.C D:\work\test_1.C

3. Define a file name mask. Determine which of the listed masks from these 6 files will select the specified group of files: casting.wmv last.wma pasta.wmvx vast.wma 1) ?as*.wm? 2) *as?.wm* 3) ?as*.wm* 4) ?as*.w*

Malyasova S.V. Computer science and ICT: a guide for preparing for the Unified State Exam. – M.: “Academy”, 2013 http://www.5byte.ru http://informikablog.ru http://www.klyaksa.net Sources:


On the topic: methodological developments, presentations and notes

Practical work No. 4 "Programming using text files"

Practical work No. 5 "Programming using binary files"

Theoretical material, an example program in C++ Builder, and an individual assignment for practical work are presented....

Lesson summary for the discipline “Information technologies in professional activities” Topic: “Protecting files and managing access to them”

Students become familiar with the concept of “information security”; what is property rights, and into what categories it is divided; the main types of crimes related to interference with the operation of a computer, preventative measures...

Methodological guide for performing practical lesson No. 3 "Windows Command Files" in the discipline "Operating Systems and Environments" for specialty 230113 Computer systems and complexes

The methodological manual was created for the implementation of basic professional educational program in accordance with the Federal State Educational Standard for the specialty vocational education 230113 Computer systems and complexes (basic training...

Now imagine that you need to find a specific document. To do this, you need to know the box in which it is located, as well as the “path” to the document inside the box: the entire sequence of folders that need to be opened to get to the papers you are looking for.

The second coordinate that determines the location of the file is the path to the file on disk. The path to a file is a sequence of directory names, starting from the root directory and ending with the one in which the file is directly stored.

Here is a familiar fairy-tale analogy to the concept of “path to a file”: “There is a chest hanging on an oak tree, in the chest there is a hare, in the hare there is a duck, in the duck there is an egg, in the egg there is a needle, at the end of which is Koshcheev’s death.”

The logical drive name, file path, and file name written down in sequence form the full file name.

If shown in Fig. 2.1 file structure is stored on the C: drive, then the full names of some of the files included in it in the symbolism of the MS-DOS and Windows operating systems look like this:

C:\IVANOV\PROGS\progl.pas

C:\PETROV\DATA\task.dat

5. File allocation table

Information about the file structure of the Disk is contained on the same disk in the form of a file allocation table. Using the OS file system, the user can sequentially view the contents of directories (folders) on the screen, moving down or up the file structure tree.

In Fig. Figure 4.1 shows an example of displaying a directory tree on logical drive E: on a computer screen (left window).

The right window shows the contents of the ARCON folder. ")then there are many files of different types. Hence, for example, it is clear that the full name of the first file in the list is as follows:

E:\GAME\GAMES\ARCON\dos4gw.exe

From the table you can get additional information about the files. For example, the file dos4gw.exe is 254,556 bytes in size and was created on May 31, 1994 at 2:00 am.

Having found an entry about the desired file in such a list, using OS commands, the user can perform various actions with it: initialize the program contained in the file; delete, rename, copy file. You will learn how to perform all these operations in a practical lesson.

Rice. 4.1 Directory tree

  1. File types

Executable files (programs).

Configuration files containing parameters necessary for the program to operate.

Library files containing descriptions of standard procedures that can be used by several programs at once.

Documents - that is, certain sets of information created by the user (or computer) using programs.

Regular files actually represent a set of blocks on the device external memory, on which the file system is supported. Such files can contain both text information and binary information. The file system does not prescribe any structure to regular files, providing a user-level representation of a regular file as a sequence of bytes.

Having regular files is not enough to organize hierarchical file systems. Requires directories that map file or directory names to their physical description. Directories are a special kind of files that are stored in external memory like regular files, but whose structure is maintained by the file system itself. Files-directories corresponds to a special type of file, in relation to which only a special set of system calls and commands can be executed.

Special files do not store data. They provide a mechanism for mapping physical external devices into file system filenames. Each device supported by the system has at least one special file. When reading or writing to a special file, a direct call is made to the corresponding driver, the program code of which is responsible for transferring data between the user process and the corresponding physical device.

As a rule, the user directly works with only two types of files: programs and documents. The former are used to create the latter. Although today it is very rare to find a program that fits in one file. That's why people talk today about software packages - that is, sets of different types of files that together form a program.

Are you one of those users who quite often have to copy the full path to a file in Windows and then paste it as text, for example, into Notepad or the command line?

If yes, then of course you know that there is a simple way to do this, namely, by holding down the Shift key on the keyboard, call on the required file context menu Explorer and click on the corresponding menu item.

But this procedure can be done even faster, just by making small changes to the system registry of the operating system. As a result, you will get the “Copy path” menu item, without having to use the Shift key to achieve the goal.

This is very convenient and saves time. Now let's see how this can be done.

Attention! Before making changes, please make backup copy system registry or create systems to restore its operation in the event of an unexpected failure.

PATH TO FILE

Create text file, for example in Notepad or Notepad++. Fill it with the following content.

In notepad, click on the keyboard shortcut Ctrl + S or the “Save as...” menu item:

  • in the “Type” field, select “All files” (or “All types” in Notepad++);
  • in the “Name” field, specify “Copy_patch.reg”;
  • click the “Save” button.

Run the created reg file for execution by double-clicking on it. Agree to make changes to the system registry.

Now in Explorer, find any file and check the operation of the above created menu command.

That's it. If you trust our site, you can safely download the ready-made reg file using . Don't worry, there are no viruses here. Please visit


Close