Kajian Perintah DOS

Menampilkan atau mengubah atribut suatu file.

Kita lihat format perintahnya

C:\Documents and Settings\labkom>attrib /?
Displays or changes file attributes.

ATTRIB [+R | -R] [+A | -A ] [+S | -S] [+H | -H] [drive:][path][filename]
[/S [/D]]

+   Sets an attribute.
-    Clears an attribute.
R   Read-only file attribute.
A   Archive file attribute.
S    System file attribute.
H   Hidden file attribute.
Specifies a file or files for attrib to process.
/S  Processes matching files in the current folder and all subfolders.
/D  Processes folders as well.

contoh : misalnya kita ingin mengilangkan file-file di drive H yang telah diberi atribut read(r), system (s), disembunyikan/hidden(h) dan arsip(a) maka perintahnya adalah :

attrib -s -r -a -h H:\ /s /d

Menampilkan nama atau mengubah direktori sekarang

Bentuk umum

Displays the name of or changes the current directory.

CHDIR [/D] [drive:][path]
CHDIR [..]
CD [/D] [drive:][path]
CD [..]

..   Specifies that you want to change to the parent directory.

Type CD drive: to display the current directory in the specified drive.
Type CD without parameters to display the current drive and directory.

Use the /D switch to change current drive in addition to changing current
directory for a drive.

If Command Extensions are enabled CHDIR changes as follows:

The current directory string is converted to use the same case as
the on disk names.  So CD C:\TEMP would actually set the current
directory to C:\Temp if that is the case on disk.

CHDIR command does not treat spaces as delimiters, so it is possible to
CD into a subdirectory name that contains a space without surrounding
the name with quotes.  For example:

cd \winnt\profiles\username\programs\start menu

is the same as:

cd “\winnt\profiles\username\programs\start menu”

which is what you would have to type if extensions were disabled.

Menjalankan interpreter perintah Windows yang baru.

Bentuk umum :

Starts a new instance of the Windows XP command interpreter

CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF]
[[/S] [/C | /K] string]

/C      Carries out the command specified by string and then terminates
/K      Carries out the command specified by string but remains
/S      Modifies the treatment of string after /C or /K (see below)
/Q      Turns echo off
/D      Disable execution of AutoRun commands from registry (see below)
/A      Causes the output of internal commands to a pipe or file to be ANSI
/U      Causes the output of internal commands to a pipe or file to be
/T:fg   Sets the foreground/background colors (see COLOR /? for more info)
/E:ON   Enable command extensions (see below)
/E:OFF  Disable command extensions (see below)
/F:ON   Enable file and directory name completion characters (see below)
/F:OFF  Disable file and directory name completion characters (see below)
/V:ON   Enable delayed environment variable expansion using ! as the
delimiter. For example, /V:ON would allow !var! to expand the
variable var at execution time.  The var syntax expands variables
at input time, which is quite a different thing when inside of a FOR
/V:OFF  Disable delayed environment expansion.

Note that multiple commands separated by the command separator ‘&&’
are accepted for string if surrounded by quotes.  Also, for compatibility
reasons, /X is the same as /E:ON, /Y is the same as /E:OFF and /R is the
same as /C.  Any other switches are ignored.

If /C or /K is specified, then the remainder of the command line after
the switch is processed as a command line, where the following logic is
used to process quote (“) characters:

1.  If all of the following conditions are met, then quote characters
on the command line are preserved:

- no /S switch
- exactly two quote characters
- no special characters between the two quote characters,
where special is one of: &<>()@^|
- there are one or more whitespace characters between the
the two quote characters
- the string between the two quote characters is the name
of an executable file.

2.  Otherwise, old behavior is to see if the first character is
a quote character and if so, strip the leading character and
remove the last quote character on the command line, preserving
any text after the last quote character.

Menyalin satu atau beberapa file ke lokasi lain.

Menampilkan atau mengubah tanggal.

Menghapus satu atau beberapa file.

Menampilkan daftar file dan subdirektori dalam sebuah direktori.

Bentuk umumnya :

DIR [drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L] [/N]
[/O[[:]sortorder]] [/P] [/Q] [/S] [/T[[:]timefield]] [/W] [/X] [/4]

Specifies drive, directory, and/or files to list.

/A          Displays files with specified attributes.
attributes   D  Directories                R  Read-only files
H  Hidden files               A  Files ready for archiving
S  System files               -  Prefix meaning not
/B          Uses bare format (no heading information or summary).
/C          Display the thousand separator in file sizes.  This is the default.  Use  /-C to disable display of separator.
/D          Same as wide but files are list sorted by column.
/L          Uses lowercase.
/N          New long list format where filenames are on the far right.
/O          List by files in sorted order.
sortorder    N  By name (alphabetic)       S  By size (smallest first)
E             By extension (alphabetic)  D  By date/time (oldest first)
G            Group directories first    -  Prefix to reverse order
/P          Pauses after each screenful of information.
/Q          Display the owner of the file.
/S          Displays files in specified directory and all subdirectories.
/T          Controls which time field displayed or used for sorting
timefield   C  Creation
A  Last Access
W  Last Written
/W          Uses wide list format.
/X          This displays the short names generated for non-8dot3 file
names.  The format is that of /N with the short name inserted
before the long name. If no short name is present, blanks are
displayed in its place.
/4          Displays four-digit years

Switches may be preset in the DIRCMD environment variable.  Override
preset switches by prefixing any switch with – (hyphen)–for example, /-W.

Membandingkan isi dari dua buah disket.

Menyalin isi dari satu disket ke disket lain.

Menampilkan pesan, atau mengubah command echoing on atau off.

Keluar dari program CMD.EXE dan menutup jendela command prompt.

Membandingkan dua atau beberapa file, dan Menampilkan perbedaan file-file tersebut.

Mencari string teks dalam sebuah file atau beberapa file.

Mem-Format sebuah hardisk/disket untuk digunakan di Windows.

Menyediakan informasi bantuan untuk perintah-perintah Windows.

Membuat, mengubah, atau menghapus volume label dari sebuah disket/harddisk.

Membuat direktori.

Bentuk umum

Creates a directory.

MKDIR [drive:]path
MD [drive:]path

If Command Extensions are enabled MKDIR changes as follows:

MKDIR creates any intermediate directories in the path, if needed.
For example, assume \a does not exist then:

mkdir \a\b\c\d

is the same as:

mkdir \a
chdir \a
mkdir b
chdir b
mkdir c
chdir c
mkdir d

which is what you would have to type if extensions were disabled.

Memindahkan satu atau beberapa file dari satu direktori ke direktori yang lain.

Menampilkan atau mengatur path pencarian untuk executable files.

Mengubah command prompt Windows.


Bentuk Umum

Removes (deletes) a directory.

RMDIR [/S] [/Q] [drive:]path
RD [/S] [/Q] [drive:]path

/S      Removes all directories and files in the specified directory
in addition to the directory itself.  Used to remove a directory

/Q      Quiet mode, do not ask if ok to remove a directory tree with /S

Mengubah nama file.

Menampilkan atau mengatur waktu sistem.

Menampilkan secara grafis struktur direktori dari sebuah drive atau path.

Menampilkan isi dari sebuah file teks.

About these ads
Explore posts in the same categories: Computer

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

%d bloggers like this: