English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

6 answers

How to use an MS-DOS Prompt window

--------------------------------------------------------------------------------

The following tutorial is meant as a brief introduction to the MS-DOS Prompt window.

Some of our scripts (such as allposters.pl and gocollect.pl) can be run on your Windows PC. If you plan on doing that, then you must know how to use an MS-DOS Prompt window and you will need to install ActivePerl on your Windows PC. For our other scripts (such as Associate Engine ae.pl), you might need to use an MS-DOS Prompt window to edit or view some files.



Let's open an MS-DOS Prompt window. To do that, click on the "Start" menu (at the lower left of your screen) and select "Run...". Then type "command" (no quotation marks) into the box and click "OK".


You should see an MS-DOS Prompt window appear.


You tell the MS-DOS Prompt window what you want to do by typing commands rather than using your mouse. The MS-DOS Prompt window understands the commands described in the table below (there are more commands than those listed below). At the end of each command, press the Enter key. To get help on a particular command, add " /?" to the end of the command, such as: "dir /?".

Command
Meaning

cls
Clears the MS-DOS Prompt window and moves the prompt to the top of the window (no files are changed -- the window display is merely cleared).

cd DIRNAME
MS-DOS works on one directory at a time. The "current" directory is indicated as part of the prompt. For example, "C:\WINDOWS\Desktop>" means that the current directory is the "Desktop" directory which is located inside the "WINDOWS" directory. Use the "cd" command to make a different directory the "current" directory ("cd" is short for "change directory"). For example, "cd \perl" will make "\perl" the current directory. To get to the "root" of your c: drive, type "cd \".

dir
dir DIRNAME
"dir" lists the contents of the current directory. "dir DIRNAME" lists the contents of the DIRNAME directory, e.g.: "dir \perl" or "dir mystuff". If you add " /p" to the end of the command, such as "dir mystuff /p", then the output will pause after each screenful and wait for you to press any key (e.g.: Enter).

notepad FILENAME
Starts the Notepad text editor program and opens the file named FILENAME. If the file does not exist, Notepad will ask you if you want to create a new file with that name. For example, "notepad allposters.ini" starts Notepad and opens the file allposters.ini located in the current directory. If you want to edit a file that is in a directory other than the current directory, then use the "cd" command first or include the directory name, such as: "notepad \www\allposters\allposters.ini".

type FILENAME
Displays on the screen the contents of the file named FILENAME. For example, "type ae.key" displays the contents of the file ae.key located in the current directory. If you want to display a file that is in a directory other than the current directory, then use the "cd" command first or include the directory name, such as: "type \www\ae\ae.key". Note: If the contents of the file is more than one screenful, then you should use the "more" command instead otherwise the text will scroll off the top of the window.

more FILENAME
Displays on the screen the contents of the file named FILENAME. For example, "more ae.ini" displays the contents of the file ae.ini located in the current directory. If you want to display a file that is in a directory other than the current directory, then use the "cd" command first or include the directory name, such as: "more \www\ae\ae.ini". Note: If the contents of the file is more than one screenful, then "-- More --" will appear after each screenful and your computer will wait for you to press the Enter key to continue or press q (or Ctrl-C) to quit.

start .
The command "start ." (the . is required, and there must be a space before it) causes the current directory to be shown graphically as a folder.

copy NAME1 NAME2
Copy the file that has name NAME1 to NAME2. The file NAME1 is unchanged. If a file with the name NAME2 already exists, you will be asked if you want to overwrite the current NAME2 file. For example, "copy allposters.ini allposters.bkp" copies allposters.ini to allposters.bkp.

ren NAME1 NAME2
Rename the file that has name NAME1 to NAME2. If NAME2 already exists, then an error message is shown instead. For example, "ren allposters.ini allposters.bkp" renames allposters.ini to allposters.bkp.

del FILENAME
Delete file that has the name FILENAME. The file FILENAME is immediately deleted without any confirmation.

WARNING: Do not delete anything unless you know exactly what you are doing. MS-DOS does not have a "Recycle Bin" so you cannot recover files deleted with the "del" command.

WARNING: The character * is the wildcard character and allows you to delete all matching files by using one command, such as "del *.tmp" deletes all files that end with ".tmp" in their filename. All matching files are immediately deleted without any confirmation and cannot be recovered.

md DIRNAME
Make a new directory named DIRNAME inside the current directory. If you want to make the new directory inside a directory other than the current directory, then use the "cd" command first. For example, "md allposters" makes a new directory called "allposters" inside the current directory.

exit
Closes the MS-DOS Prompt window. Equivalent to clicking on the "X" close button (top right of the window frame).

2006-11-27 00:15:04 · answer #1 · answered by babygirl 3 · 0 0

use 'del' command from dos prompt.

example, if you want to delete 1.exe, from command prompt, enter into the directory where 1.exe is located, now run

..:\>del "1.exe"

this will delete 1.exe

even ..:\>del 1.exe will also work the same way, but better use blocks while specifing file name when it contains space...

2006-11-26 22:59:08 · answer #2 · answered by dArshAk 1 · 0 0

u can delete it by

del filename.extention

see now u have to delete the sample.c file

so u can give like this

del sample.c

now u have to delete the files starting s

del s*.*

it deletes all the files starting s in the current directory...

2006-11-26 23:11:05 · answer #3 · answered by nataraajc 2 · 0 0

I'll assume you're asking for windows.

Go to the right directory using the cd command.

del filename

If your'e using a unix based bachine: the command is
rm filename

2006-11-26 22:58:27 · answer #4 · answered by anonymous 3 · 0 0

Microsoft abode windows deleted products bypass to the Recycle Bin, although the archives deleted from MS-DOS or the abode windows command line does no longer deliver archives to the Recycle Bin. It deletes archives internally or completely. it will be get well by creating use of fix utilities equipment.

2016-11-29 20:13:52 · answer #5 · answered by ? 4 · 0 0

i think :specify the directory then
del filename

2006-11-26 22:59:42 · answer #6 · answered by Haruhi 1 · 0 0

fedest.com, questions and answers