How to manage files via CMD: the most important DOS commands

With the proliferation of Windows, users have almost forgotten the good old DOS commands. But accessing programs, copying files, and changing settings were all possible with DOS. Such commands can be used now, how exactly – we will tell in our article.

Command line: invocation and use

DOS commands can still be found even in the days of colorful windows and animated programs. You start to remember this, for example, if you have problems with Windows and you need to back up your data without using a graphical interface. There are two ways to open a DOS window (in Windows this is called “Command Prompt”):

  • Call from the “Start” menu in the “All Programs” – “Accessories” (Windows 7) or “Start” – “Windows-system” – “Command Prompt” (Windows 10).
  • Invoke from Windows search by entering the command “cmd”.

Navigating the file system

Navigating the file system in DOS is done with the cd command. It stands for “change directory” and can be used in several ways:

  • Direct call of a folder, for example, with “cd Documents”. This command will take you directly to the Documents folder.
  • Calling “cd \”. This command will return you directly to the root directory of your hard drive.
  • The “cd” command can be used in conjunction with the “dir” command, which allows you to browse directories on your hard drive. With these two commands, you have the ability to navigate the entire hard drive.
  • In addition, “dir” can be used with options such as “dir / w” and “dir / p” to page through the contents of your directories. This is recommended for the convenience of browsing very large directories.

Creating, copying and deleting folders via DOS commands

Having explored directory navigation in the previous paragraph, now let’s see how you can create, copy and delete folders.

  • The md command stands for “make directory” and creates a new folder in the current directory, which is where you are now. The folder is created using the “MD [directory name]” command, such as “MD Test”.
  • The del [filename] or “erase [filename]” commands delete the file. The rd [directory name] command removes an empty directory.
  • The copy command for copying files is a little more complicated. Here you need to provide source and destination with directory and filenames. Example: “copy c: \ test \ testdatei.txt c: \ testdatei.txt”. This example will copy the file “testdatei.txt” from the folder “c: \ test” to the main directory “c: \”.

Network functions in a DOS window

Now let’s take a look at a function you may have used in Windows in DOS mode: determining your IP address and network settings.

  • Calling the “ipconfig” command allows you to get the current IP address, gateway and subnet. With the “ipconfig / all” command, you will find all the detailed information such as the MAC address of your network card.
  • The Ipconfig command is also often used in conjunction with the ping command. It can check the connection between two computers on the network and is called using “ping [computer name]” or “ping [IP address]”.
  • The “arp -a” command lists the computers or devices your device communicated with. This is important, for example, if your computer is connected to an unknown router. Thus, you will receive the IP address of the router and can use it to access the Internet.
  • If you need information about users, the “finger [ComputerName]” command can be useful. The main thing is that it is not blocked by a firewall.
  • “Ftp” allows you to send and receive files. To do this, enter “ftp” at the command line. After that you can enter additional commands, for example, “open host”. This will establish a connection to the FTP server.

Other useful commands

In the case of batch files or scripts, it makes sense to tell the user what the script is doing. The command “echo [message]” is suitable for this.
Disk partitions contain, among other things, encrypted files. Information about this can be obtained using the “cipher / C” command. In addition, files can be encrypted using the “/ D” option or decrypted using “/ E”. Note, however, that this command for working with partitions only works on the NTFS file system.

If you are logged in on a remote computer, you can remotely control its shutdown using the command: “shutdown / s”. Using the same command with the “/ r” parameter will restart the computer. The “/ l” option will log out of the current session.

For a complete overview of DOS commands, type “help” in a DOS window. As a result of its execution, you will see all the main commands in the form of a list. You can also get detailed information about specific functions by calling help [command], such as help cd or help copy. Also known from the good old days of DOS classic games, you can run under DOSBox.

Leave a Reply

Your email address will not be published. Required fields are marked *