Free hard drive encryption - Download a trial of SafeGuard Easy
Using the Windows command line: basic DOS commands
Occasionally on your Windows computer, you may need to perform a procedure by typing in commands at the 'Command Prompt'. Entering commands in this way allows you to bypass the Windows graphical user interface and communicate directly with the operating system. You are most likely to need to work in this way if you get an infection and have to disinfect your computer from the command line, for example, using one of the Sophos Resolve tools, or SAV32CLI or SWEEP.EXE.
To communicate through the Windows command line, you will need to use MS-DOS commands. This article lists some basic DOS commands that you are likely to find useful when working from the command line, but there are many more available. To find out more about MS-DOS, consult a book, online dictionary or encyclopedia, or other specialist publication.
| Command and Usage | Examples |
|---|---|
|
|
ATTRIB -R -A -S -H <VIRUS.EXE>All these attributes will be removed from virus.exe. |
C:Go to the C: drive. Similarly A: and D: etc. |
C: |
|
Note, directory is the term used by DOS for what Windows calls a folder. |
CD\ takes you to the top of the directory tree (typically to C:) .
To change to another path, type the full path with slashes. e.g. |
CLSClear the screen. |
CLS |
DELDelete one or more files in the current directory. Can be used with the '*' and the '?' wildcards.
(Note: DEL cannot be used to delete directories. Use RD to remove a directory.) |
DEL <VIRUS.EXE> deletes virus.exe
|
DIRDisplays the contents of a directory (folder). Note, directory is the term used by DOS for what Windows calls a folder. These switches can be combined, so You can use the '*' and the '?' wildcards to search for a particular file. The ? character represents ONE character, and the * character represents multiple characters.
|
|
|
|
|
|
|
|
|
|
|
|
|
Prints LOGFILE.TXT |
|
|
|
|
|
|
|
|
|
|
|
e.g. SWEEP > REPORT.TXT The details of any infected files reported by SWEEP are sent to a file called REPORT.TXT. |
Accessing the command prompt from Windows
To access the command prompt from Windows (a 'DOS box'), do as follows:
- At the taskbar, select Start|Run.
- Type
CMD
or on some versions of WindowsCOMMAND - Click 'OK'.
A command prompt will open.
Accessing the command prompt in safe mode
- For Windows NT/2000/XP/2003, see the knowledgebase article on removing files with SAV32CLI.
- For Windows 95/98/Me you can boot from a startup disk, or use MS DOS mode
- At the taskbar, select Start|Shut dows.
- Select 'Restart in MS-DOS mode'.
- Click 'OK'.
If you need more information or guidance, then please contact technical support.
- Article ID: 13195
- Created: 6 Jun 2005
- Last updated: 14 Oct 2008
- Protect sensitive data from unauthorized use
- Encrypt data, hard drives and removable media
- Work uninterrupted with encryption on demand

