
Perintah CMD ? Anda harus tahu! 95 Perintah CMD Command Prompt
Saya harap baik – baik saja kalian semuanya, kadang – kadang saya lupa dengan perintah – perintah pada cmd, nah gaes sebagai pengingat dan catatan saya khususnya kali ini giginau akan mempost artikel 95 Perintah – Perintah Command Prompt CMD serta syntax dan fungsi nya. seperti kita ketahui command prompt atau cmd adalah alternatif cara untuk mengoperasikan perangkat Windows.
Pengertian Command Promt (CMD)
Command Promt (CMD) adalah baris perintah penerjemah (baris perintah yang di eksekusi ke sistem operasi yang di sediakan oleh Microsoft pada OS/2, Windows CE, dan keluarga sistem operasi Windows NT .
Kemudian CMD untuk berfungsi mendefinisikan perintah – perintah yang di tulis di command text untuk di eksekusi dan di jalankan oleh sistem operasi windows.
Perintah Command Prompt CMD sangat perlu kita ketahui untuk menunjang ilmu pengetahuan kita terhadap system operasi Windows.
Sementara kita perlu tahu Perintah Command Prompt CMD apa saja yang dapat di gunakan untuk menjalankan perintah perintah tertentu. Berikut adalah tabel dengan 95 Perintah Command Prompt CMD serta fungsinya:
Baca Juga : Belajar C++ Class, Tutorial backup database dengan batchfile.
Tabel Perintah – Perintah CMD
Command | Function | Syntax |
ASSOC | Displays or modifies file extension associations. | Read file associations: ASSOC ASSOC .ext Set a file association: ASSOC .ext = [fileType] Remove a file association: ASSOC .ext = |
ATTRIB | Displays or changes file attributes. | ATTRIB [ + attribute | – attribute ] [pathname] [/S [/D]] [/L] |
BREAK | Sets or clears extended CTRL+C checking. | GOTO label |
BCDEDIT | Sets properties in boot database to control boot loading. | BCDEdit /Command [Argument1] [Argument2] … |
CACLS | Displays or modifies access control lists (ACLs) of files. | CACLS pathname [options] |
CALL | Calls one batch program from another. | CALL [drive:][path]filename [parameters] CALL :label [parameters] CALL internal_cmd |
CD | Displays the name of or changes the current directory. | CD [/D] [drive:][path] CD [..] |
CHCP | Displays or sets the active code page number. | CHCP code_page |
CHDIR | Displays the name of or changes the current directory. | CD [/D] [drive:][path] CD [..] |
CHKDSK | Checks a disk and displays a status report. | CHKDSK [drive:][[path]filename] [/F] [/V] [/R] [/L[:size]] |
CHKNTFS | Displays or modifies the checking of disk at boot time. | CHKNTFS drive: […] CHKNTFS /C drive: […] CHKNTFS /X drive: […] CHKNTFS /t[:Time] CHKNTFS /D |
CLS | Clears the screen. | CLS |
CMD | Starts a new instance of the Windows command interpreter. | CMD [charset] [options] CMD [charset] [options] [/C Command] CMD [charset] [options] [/K Command] |
COLOR | Sets the default console foreground and background colors. | COLOR [background][foreground] |
COMP | Compares the contents of two files or sets of files. | COMP [pathname1] [pathname2] [/D] [/A] [/L] [/N=number] [/C] |
COMPACT | Displays or alters the compression of files on NTFS partitions. | COMPACT [/C | /U] [/S[:dir]] [/A] [ /I] [/F] [/Q] [filename […]] |
CONVERT | Converts FAT volumes to NTFS. You cannot convert the current drive. | convert [Volume] /fs:ntfs [/v] [/cvtarea:FileName] [/nosecurity] [/x] |
COPY | Copies one or more files to another location. | COPY [options] [/A|/B] source [/A|/B] [+ source2 [/A|/B]…] [destination [/A|/B]] COPY source1 + source2.. destination [options] |
DATE | Displays or sets the date. | to display the date DATE /T to set the system date DATE or DATE <date_today> |
DEL | Deletes one or more files. | DEL [options] [/A:file_attributes] files_to_delete |
DIR | Displays a list of files and subdirectories in a directory. | DIR [pathname(s)] [display_format] [file_attributes] [sorted] [time] [options] |
DISKPART | Displays or configures Disk Partition properties. | DISKPART |
DOSKEY | Edits command lines, recalls Windows commands, and creates macros. | DOSKEY [options] [macroname=[text]] |
DRIVERQUERY | Displays current device driver status and properties. | driverquery [/s Computer] [/u Domain\User /p Password] [/fo {TABLE|LIST|CSV}] [/nh] [/v] [/si] |
ECHO | Displays messages, or turns command echoing on or off. | ECHO [ON | OFF] ECHO [message] ECHO /? |
ENDLOCAL | Ends localization of environment changes in a batch file. | ENDLOCAL |
ERASE | Deletes one or more files. | DEL [options] [/A:file_attributes] files_to_delete |
EXIT | Quits the CMD.EXE program (command interpreter). | EXIT [/B] [exitCode] |
FC | Compares two files or sets of files, and displays the differences between them. | FC [options] [drive1:][path1] filename1 [drive2:][path2] filename2 |
FIND | Searches for a text string in a file or files. | FIND [/V] [/C] [/N] [/I] “string” [pathname(s)] |
FINDSTR | Searches for strings in files. | FINDSTR string(s) [pathname(s)] [/R] [/C:”string“] [/G:StringsFile] [/F:file] [/D:DirList] [/A:color] [/OFF[LINE]] [options] |
FOR | Runs a specified command for each file in a set of files. | syntax-FOR-Files FOR %%parameter IN (set) DO command syntax-FOR-Files-Rooted at Path FOR /R [[drive:]path] %%parameter IN (set) DO command syntax-FOR-Folders FOR /D %%parameter IN (folder_set) DO command syntax-FOR-List of numbers FOR /L %%parameter IN (start,step,end) DO command syntax-FOR-File contents FOR /F [“options”] %%parameter IN (filenameset) DO command FOR /F [“options”] %%parameter IN (“Text string to process”) DO command syntax-FOR-Command Results FOR /F [“options”] %%parameter IN (‘command to process’) DO command |
FORMAT | Formats a disk for use with Windows. | FORMAT volume [/FS:file-system] [/V:label] [/Q] [/L] [/A:size] [/C] [/I:state] [ /X] [/P:passes] [/S:state] FORMAT volume [/V:label] [/Q] [/F:size] [/P:passes] FORMAT volume [/V:label] [/Q] [/T:tracks /N:sectors] [/P:passes] FORMAT volume [/V:label] [/Q] [/P:passes] FORMAT volume [/Q] |
FSUTIL | Displays or configures the file system properties. | |
FTYPE | Displays or modifies file types used in file extension associations. | Syntax FTYPE fileType=executable_path FTYPE FTYPE fileType FTYPE fileType= |
GOTO | Directs the Windows command interpreter to a labeled line in a batch program. | GOTO label |
GPRESULT | Displays Group Policy information for machine or user. | gpresult [/s Computer [/u [Domain\]UserName [/p [Password]]]] [/user [TargetDomain\]TargetUser] [/scope {user | computer}] [/r | /v | /z] [[/x | /h] FileName [/f]] |
GRAFTABL | Enables Windows to display an extended character set in graphics mode. | None |
HELP | Provides Help information for Windows commands. | WINHELP [options] helpfile.hlp WINHLP32.exe [options] helpFile |
ICACLS | Display, modify, backup, or restore ACLs for files and directories. | None |
IF | Performs conditional processing in batch programs. | C:\> IF 100 GTR 50 ECHO its more than 50! its more than 50! C:\> If 130 GTR 14 Echo OK OK C:\> If “130” GTR “14” Echo OK |
LABEL | Creates, changes, or deletes the volume label of a disk. | GOTO label GOTO:eof |
MD | Creates a directory. | MD [drive:]path [[drive:]path…] |
MKDIR | Creates a directory. | MD [drive:]path [[drive:]path…] |
MKLINK | Creates Symbolic Links and Hard Links | MKLINK [[/D] | [/H] | [/J]] LinkName Target |
MODE | Configures a system device. | Device Status: MODE [device] [/STATUS] |
MORE | Displays output one screen at a time. | command | MORE [/E [/C] [/P] [/S] [/Tn] [+n]] MORE [/E [/C] [/P] [/S] [/Tn] [+n]] < Pathname MORE /E [/C] [/P] [/S] [/Tn] [+n] [Pathname(s)] |
MOVE | Moves one or more files from one directory to another directory. | MOVE [options] [Source] [Target] |
OPENFILES | Displays files opened by remote users for a file share. | Openfiles.exe /query [/s Computer [/u Domain\User [/p Password]]] [/fo {TABLE|LIST|CSV}] [/nh] [/v] Openfiles.exe /disconnect [/s Computer [/u Domain\User [/p Password]]] {[/id OpenFileID]|[/a UserName]|[/o OpenMode]} [/se SessionName] [/op OpenFileName] |
PATH | Displays or sets a search path for executable files. | PATH pathname [;pathname] [;pathname] [;pathname]… PATH PATH ; |
PAUSE | Suspends processing of a batch file and displays a message. | PAUSE |
POPD | Restores the previous value of the current directory saved by PUSHD. | POPD |
Prints a text file. | PRINT [/D:device] [pathname(s)] | |
PROMPT | Changes the Windows command prompt. | PROMPT [text] |
PUSHD | Saves the current directory then changes it. | PUSHD [drive]path |
RD | Removes a directory. | RD pathname RD /S pathname RD /S /Q pathname |
RECOVER | Recovers readable information from a bad or defective disk. | RECOVER [drive:][path]filename |
REM | Records comments (remarks) in batch files or CONFIG.SYS. | @ECHO OFF :: :: First comment REM Second comment REM Echo Hello REM This remark is displayed by echo Echo Hello & REM This remark is ignored by echo Copy work.xls backup.xls &:: We backed up the file |
REN | Renames a file or files. | REN [drive:][path]SourceMask TargetMask |
RENAME | Renames a file or files. | REN [drive:][path]SourceMask TargetMask |
REPLACE | Replaces files. | %variable:StrToFind=NewStr% %~[param_ext]$variable:Param |
RMDIR | Removes a directory. | RD pathname R D /S pathname RD /S /Q pathname |
ROBOCOPY | Advanced utility to copy files and directory trees | ROBOCOPY Source_folder Destination_folder [files_to_copy] [options] |
SET | Displays, sets, or removes Windows environment variables. | SET variable SET variable=string SET “variable=string” SET “variable=” SET /A “variable=expression” SET /P variable=[promptString] SET “ |
SETLOCAL | Begins localization of environment changes in a batch file. | SETLOCAL SETLOCAL {EnableDelayedExpansion | DisableDelayedExpansion} {EnableExtensions | DisableExtensions} |
SC | Displays or configures services (background processes). | SC [\\server] [command] [service_name] [Options] |
SCHTASKS | Schedules commands and programs to run on a computer. | Create a new scheduled task: SCHTASKS /Create [Connect_Options] Create_Options /TN taskname Delete the scheduled task(s) SCHTASKS /Delete [Connect_Options] /TN taskname [/F] Display one or all scheduled tasks: SCHTASKS /Query [Connect_Options] [/FO format | /XML] [/NH] [/V] [/TN taskname] Run the scheduled task on demand: SCHTASKS /Run [Connect_Options] /TN taskname |
SHIFT | Shifts the position of replaceable parameters in batch files. | SHIFT [/n] |
SHUTDOWN | Allows proper local or remote shutdown of machine. | SHUTDOWN [shutdown_options] [/m \\Computer] [other_options] |
SORT | Sorts input. | SORT [options] |
START | Starts a separate window to run a specified program or command. | START “title” [/D path] [options] “command” [parameters] |
SUBST | Associates a path with a drive letter. | SUBST drive_letter: path SUBST SUBST drive_letter: /D |
SYSTEMINFO | Displays machine specific properties and configuration. | SYSTEMINFO [/S system [/U username [/P [password]]] ] [/FO format] [/NH] |
TASKLIST | Displays all currently running tasks including services. | Tasklist options |
TASKKILL | Kill or stop a running process or application. | TASKKILL [/S system [/U username [/P [password]]]] { [/FI filter] [/PID processid | /IM imagename] } [/F] [/T] |
TIME | Displays or sets the system time. | TIME [new_time] TIME TIME /T |
TITLE | Sets the window title for a CMD.EXE session. | TITLE [string] |
TREE | Graphically displays the directory structure of a drive or path. | TREE [drive:][path] [/F] [/A] |
TYPE | Displays the contents of a text file. | TYPE [drive:]pathname(s) |
VER | Displays the Windows version. | VER |
VERIFY | Tells Windows whether to verify that your files are written correctly to a disk. | VERIFY [ON | OFF] |
VOL | Displays a disk volume label and serial number. | VOL [drive:[drive:]] |
XCOPY | Copies files and directory trees. | XCOPY source [destination] [options] |
WMIC | Displays WMI information inside interactive command shell | WMIC [global_switch(s)] Alias [options] [format] WMIC [global_switch(s)] Command WMIC [global_switch:value] [global_switch:value] Command WMIC CONTEXT Interactive mode: WMIC |
Baca : Belajar C++ Class, Tutorial backup database dengan batchfile.
Jika blog ini bermanfaat tolong jangan lupa share dan ikuti terus artikel – artikel terbaru dari kami. Harapan saya kita semua sehat selalu dan Terimakasih
0 Komentar