Abstract: Software shells. Copying files - COPY command Installing the Midnight Commander program

In the DOS era, not every ordinary user could work with this operating system. The difficulties lay in both the perception of file system, and in remembering all the commands necessary to control the computer. The command line prompt was all DOS provided to the user. This line contained the address of the current directory. The user had to remember all the directories and the names of all the files located in them. That is why DOS in its pure form was never used by anyone. Used wrappers– operating system add-ons that make it easier to work with operating system commands and directory structures, as well as change the visual perception of the operating system.

One of the most popular file shells of that era was Norton Commander. It consisted of two windows: current and target. The windows displayed all the directories and files of the directories they represented. You could copy or move a file from the current directory to the target directory by pressing just one key. Without this wrapper, in order to copy a file such as "macros.txt", you would have to write a command like this

Copy macros.txt > c:\program files\xerox

All shell program commands were implemented by pressing function keys, their list is placed under the windows. The shell program also provided the ability to use the command line. The pictures show Norton Commander shell programs and modern Far.

Figure 2 Norton Commander

Figure 3 Far

In the early 90s, the graphical shell MS-Windows 3.x became extremely popular all over the world. This shell program was of a slightly different kind. Her GUI Instead of typing complex commands from the keyboard, it allows you to select them from the menu with the mouse almost instantly. The Windows operating environment, working in conjunction with the DOS operating system, implements all the properties necessary for user productivity, including multitasking mode. It provided the ability to open each directory in separate window and carry out operations with files by clicking on them with the mouse. The Windows 3.1 shell program can be considered the prototype of the Windows graphical operating system.

Figure 4 Windows 3.1

Modern tools for working with files and directories are called file managers. It would seem that the Windows operating system provides user-friendly interface and the ability to work with files. However, among professionals, file managers are highly preferred. This is due to the fact that the graphical environment slows down work with the computer (oddly enough). The point is that in order to carry out some kind of manipulation with graphic object on the screen, you first need to find it. Then press the menu button and FIND the desired menu item, and then move the cursor to it. This requires increased attention, and, consequently, tension. File managers use hotkeys, which allows you to perform search, copy, delete (etc.) operations by pressing one or two keys. In addition, file managers provide options for quickly turning on frequently used applications and utilities. For example, an archiver program can be launched directly using a button on the toolbar (rather than searching for executable file this program by folders).


Most popular file manager can be considered a program Total Commander. The principle underlying its interface has not changed at all since the DOS era.

Figure 5 Total Commander

Selecting a folder or file in an Explorer window

To perform any operation on an object, it must be select (highlight). As a result, the icon and name of the selected object will be highlighted in a special color:

Click left mouse buttons by icon or name;

By pressing the key with the first letters of the name;

Cursor keys.

Opening an object

Double-click the left mouse button on the desired object.

Select an object using any of the above methods and execute the Open command from the File menu, etc.

Select an object and click .

Also Windows 7 there is a simple and quick way open the folder in a new Explorer window. Just click on the desired folder right-click and select “Open in new window” from the context menu that appears.

Changing/viewing object properties

To access the properties of objects, you need to select the Properties item in the context menu (Fig. 2.11).

Rice. 2.11. File properties window

Creating an Object

To create an object - a folder, a shortcut, text document- do the following:

1. open the folder in which the object will be created;

2. in the File menu, select the New command and select an object type, for example, Folder, or use the command of the same name in the context menu;

3. A new object icon and a default name will appear in the folder.

4. Enter a new object name and press Enter.

Selecting, copying and moving a file/folder

Files and folders, like any other objects, can be copied, moved, deleted, and renamed.

To copy, move, delete, or rename an object, you must first select it. To do this, click on the object with the mouse - its icon and caption will change color.

To select multiple objects at once, hold down while selecting objects. Ctrl key. To select objects located in a row, press the Shift key and click on the first and last object; To select all objects in the window, select the Select All command in the Edit menu or press Ctrl4-A.



You can remove the selection by clicking any free space on the screen, To deselect one or more objects without deselecting the others, press the Ctrl key and click the object from which you are deselecting.

Copying and moving an object

Copying an object consists of duplicating it and playing it in another folder, on another disk or computer. During the copying (moving) process, a progress indicator appears on the screen to indicate the copying process. The inscription above the indicator shows the file name, as well as which folder is being copied to which. Below the indicator indicates how much longer the copying will take.

You can move and copy an object in several ways:

1. using menu commands; 2.using the context menu; 3. by dragging the mouse (left key); 4. using special dragging with the mouse (right key).

Moving/copying an object using menu commands

1. select an object;

2. Select the Cut command from the Edit menu to move the selected object or the Copy command to copy the object. The key combination that duplicates the Cut command is Ctrl+h (Ctrl+x), the Copy command is Ctrl+c (Ctrl+c);

3. Select the folder into which the object will be pasted, and select the Paste command from the Edit menu (Ctrl+m). The commands specified in the last two paragraphs can be selected in the context menu, which will appear on the screen after right-clicking on the object.

Moving/copying an object using the context menu

1. select an object in the folder window and click the right mouse button;

2. Select the Cut command to move the selected object or the Copy command to copy the object;

3. Select the folder into which the object will be pasted and select the Paste command from the context menu.

Moving/copying an object using mouse drag

For movements object, drag its icon with the left mouse button to the desired folder.

For copying Also hold down the Ctrl key while moving the object.

Moving/copying an object using special dragging the mouse

Drag the object icon with the right mouse button to the desired folder and select the corresponding menu item that appears.

Renaming an object

To change the name of an object, select the desired icon in the folder window, select Rename from the File menu and enter a new name. The same command is contained in the context menu that appears after right-clicking on an object

To rename the selected object from the keyboard, press F2 and enter a new name. If you make a mistake when entering a new name, press the Esc key. If you select Rename and delete the object's name, and then try to do something else instead of entering a new name, you will be prompted to give the object a new name first. In cases where the file extension is not shown in the window, you should not enter it when renaming the file. Otherwise, the extension you specify will be perceived as part of the file name (for example, Sheet, txt.txt).

Deleting an object

You can delete a file, folder, or shortcut after highlighting the item's icon. in the following ways:

1. Select the Delete command from the File menu.

2. Press the Delete key.

3. Drag the icon of the object being deleted with the mouse to the Recycle Bin. The icon of the object being dragged will disappear.

4. Drag the object icon to the trash by clicking the right mouse button. When you release the button, a context menu will appear. Select the Move command.

In Windows, the deleted object is not destroyed, but is moved to the Recycle Bin for temporary storage. If you don't want to place the item you want to delete in the Recycle Bin, press the Shift and Del keys at the same time.

Simultaneous movement, copying or deleting of a group of files is performed after they are selected.

1. Open the Explorer window in any way.

2. In the left area, activate the Documents folder.

3. Create a new folder in it with a name corresponding to your last name (Folder Last Name).

4. Activate a new folder and create a folder in it with the name of the group (Group folder).

5. Add the Last Name folder to Favorites.

6. Open any folder on drive C: in a new window, select several non-consecutive files and copy them to the last created folder (Group) using the context menu.

7. Change the type of file presentation. Arrange files in descending order by modification date, then by file name.

8. Create in the Last Name folder Word document. Rename it to student.doc.

9. Set Explorer to display the extensions of registered files.

10. Change the attributes of the student.doc file.

11. Move the student.doc file to the Special Group folder. by dragging.

12. Implement fast go to drive C:.

13. Delete the Group folder without placing it in the Trash.

CONTROL QUESTIONS

1. Name the basic operations with the file structure.

2. What is the Explorer program intended for?

3. How to launch the Explorer program?

4. What is the purpose of the Navigation Pane?

5. How to display the Explorer menu?

6. How to display extensions for registered file types

7. How to quickly move between folders in Explorer?

8. How to add a folder to Favorites?

9. How can you select several non-adjacent objects at the same time?

10. How to create new object inside a folder?

11. How to view the properties of an object?

12. Name the methods for copying/moving objects.

13. How to delete an object without placing it in the Trash?

- call to the help screen - call to the user program menu screen. Using this menu, you can easily call up any program from the disk, no matter what subdirectory it is in. Setting the user menu is done using the Menu files edit option in the COMMANDES command. (F3) - view the file contents in symbolic form. This command displays in symbolic form the contents of the file indicated by the highlight. If this file contains text information, then in this way it is easy to view a file of any length; moving through the file is done using the keys (), (↓), (PgUp), (PgDn). The (Home) and (End) keys allow you to immediately go to the beginning or end of the file, respectively. Lateral movement is carried out either with the keys (←), (→), or (Ctrl - left) or (Ctrl - right). The last two commands perform fast movement. In viewing mode, you can also search for a specified sequence of text characters. To do this, you need to execute the SEARCH function ((F7)). Exit viewing mode - (F10) or (Esc). - file editing. Using this command you can perform simple file editing. Editing commands are listed in the tooltip in the DELETE section. The editor tooltip is called up by pressing (F1). When using this function, care should be taken in the case of mixed (text and binary) files, as careless modification of the file may render it completely unusable for further use. After corrections are made to the file, a “*” symbol appears in the top line next to the file name, indicating that the file was modified and not written. If you try to exit this mode using (F10) or (Esc), NORTON COMMANDER will warn you that the file has been modified and is not written to disk. The file is written to disk with the same name using the command (F2). Wherein backup copy with the .bak extension is not created, which must always be remembered. In edit mode, the function of searching for a given sequence of characters is also possible ((F7)). If the file contains codes that do not correspond to alphanumeric characters and some control codes, then reading stops. Maximum size The file is about 25 KB. - copying files. This command can be used in two modes: in mode with highlighting of selected files and without it. If you press (F5) without highlighting the file names, the file on which the cursor is positioned will be copied from the active window to the inactive one. In this case, the program will additionally request the path for copying. This way you can copy the file to the directory in which it already exists, under a different name. By default, the path is set to an inactive window. If at least one was highlighted, then it will be copied, and not the one the cursor is pointing at. If a file with the same name already exists, NORTON COMMANDER will ask for confirmation to overwrite only this file or all duplicate file names. Similarly, confirmation is required to overwrite a write-protected file. - moving a file from one subdirectory (disk drive) to another. It operates similarly to the command (F5), with the only difference being that in the subdirectory from which the file is being transferred, it is erased. - create a directory. The command is similar to the DOS MD command - erase file(s). The command is similar to the command (F5) and also makes an additional request when erasing write-protected (read only) files, the program that manages the exchange by email allows you to change the attributes of marked files or, if there are none, of the current file. Offers to establish a trace. attributes: - Read only – read only; - archive - archived; - hidden - hidden; - system - system. (+) selection by file group mask when copying, moving, deleting and other operations with files. (-) cancel selection, split the original file into several files, merge previously split files into a single file – exit the program

COPY command when working in command line allows you to copy one or more files. The command syntax is: COPYsource[+ source [+ ...]][result]. The source is the name of the file being copied, and the result is the directory where the copy of that file will be placed and/or the name of the file being created.

For example, let’s create some file on drive “C” (I created text file“robot.txt”), and on drive “D” some folder (I created the folder “folder1”). Then the command to copy the file “robot.txt” to the folder “folder1” looks like this: copy robot.txt d:\folder1

If you need to copy a file but change its name, you need to write the following command: copy robot.txt d:\folder1\file.txt In this case, the file “robot.txt” will be copied to the folder “folder1”, but with the name “file.txt”.

In order to copy all files with the selected extension, you must put an asterisk “*” instead of the file name. For example, let’s create some folder on the “C” drive (I created the “papka” folder) and copy into it all the text files from the “folder1” folder located on the “D” drive. The command will look like: copy d:\folder1\*.txt c:\papka

If you do not specify a directory as [result], the copy command will copy the file(s) and place them in the current directory. In this case, the copied files will have the same name, creation date and time as the original file. For example, let’s create a text file named “robot1.txt” in the folder “folder1” located on drive “D”. After that, in the command line, change the current directory from “C:\>” to “C:\Fapka”. Then the copy d:\folder1\robot1.txt command will copy the file “robot1.txt” from the folder “folder1” and place it in the current directory, i.e. to the “papka” folder located on the “C” drive. Moreover, the name, date and time of creation of the copied file will be identical to the original file.

In order to copy all files from a specific directory, you must put an asterisk “*” instead of the file name and an asterisk “*” instead of the file extension. For example, let’s create several files in the “folder1” folder that have different extensions (Word document, Rar archive etc.). Then the command to copy all files from the folder “folder1” to drive “C” will look like: copy d:\folder1\*.* c:\


The [source] or [result] of copying can be not only files, but also various devices computer. The following device names are supported on Windows:

  • LPT1 – LPT3 (parallel ports).
  • COM1 – COM3 (serial ports).
  • CON (terminal, for output it is the computer screen, for input it is the keyboard).
  • PRN (printer).
  • AUX (device connected to serial port 1).

For example, using the command line and using the “copy” command, you can create a text file and write information to it: copy con f1.txt . The copy con f1.txt command will create a text file “f1.txt” and copy the characters you enter from the keyboard into it.

After entering the command copy con f1.txt, press Enter and enter the words that need to be saved (I entered command com). After entering, you must mark the end of the file (press Ctrl+Z).
Using the copy command you can merge multiple files into one file. For example, let’s create two files f2.txt and f3.txt on drive “C” (we created the f1.txt file earlier) and write some information to these files. Then the team copy f1.txt+f2.txt+f3.txt d:\f4.txt will copy the contents of the files “f1.txt”, “f2.txt”, “f3.txt” to the file “f4.txt”, which will be automatically created on the “D” drive.

If, when merging files, you do not specify the file - [result], then all information will be saved in the first file. For example, the command copy f1.txt+f2.txt+f3.txt will add the contents of file f1.txt to the contents of files f2.txt and f3.txt

Key /Y disables the message about replacing files. By default, when copying files, if such a file exists, a message warning about the replacement is displayed on the screen. The user can agree with the replacement (press Y) or disagree (press N). The /Y switch disables this message and copying occurs immediately. For example, let’s create a file vov.txt on drive “C” and copy it to drive “D”: copy vov.txt d:\
Then copy this file again. In this case, the message “Replace d:\vov.txt) is displayed