Perintah CMD Command Prompt

Perintah CMD
Perintah CMD Command Prompt

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

CommandFunctionSyntax
ASSOCDisplays or modifies file extension associations.Read file associations: ASSOC ASSOC .ext Set a file association: ASSOC .ext = [fileType] Remove a file association: ASSOC .ext =
ATTRIBDisplays or changes file attributes.ATTRIB [ + attribute | – attribute ] [pathname] [/S [/D]] [/L]
BREAKSets or clears extended CTRL+C checking.GOTO label
BCDEDITSets properties in boot database to control boot loading.BCDEdit /Command [Argument1] [Argument2] …
CACLSDisplays or modifies access control lists (ACLs) of files.CACLS pathname [options]
CALLCalls one batch program from another.CALL [drive:][path]filename [parameters] CALL :label [parameters] CALL internal_cmd
CDDisplays the name of or changes the current directory.CD [/D] [drive:][path]
CD [..]
CHCPDisplays or sets the active code page number.CHCP code_page
CHDIRDisplays the name of or changes the current directory.CD [/D] [drive:][path]
CD [..]
CHKDSKChecks a disk and displays a status report.CHKDSK [drive:][[path]filename] [/F] [/V] [/R] [/L[:size]]
CHKNTFSDisplays or modifies the checking of disk at boot time.CHKNTFS drive: […] CHKNTFS /C drive: […] CHKNTFS /X drive: […] CHKNTFS /t[:Time] CHKNTFS /D
CLSClears the screen.CLS
CMDStarts a new instance of the Windows command interpreter.CMD [charset] [options] CMD [charset] [options] [/C Command] CMD [charset] [options] [/K Command]
COLORSets the default console foreground and background colors.COLOR [background][foreground]
COMPCompares the contents of two files or sets of files.COMP [pathname1] [pathname2] [/D] [/A] [/L] [/N=number] [/C]
COMPACTDisplays or alters the compression of files on NTFS partitions.COMPACT [/C | /U] [/S[:dir]] [/A] [ /I] [/F] [/Q] [filename […]]
CONVERTConverts FAT volumes to NTFS. You cannot convert the current drive.convert [Volume] /fs:ntfs [/v] [/cvtarea:FileName] [/nosecurity] [/x]
COPYCopies 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]
DATEDisplays or sets the date. 
to display the date DATE /T
to set the system date DATE
or DATE <date_today>
DELDeletes one or more files.DEL [options] [/A:file_attributes] files_to_delete
DIRDisplays a list of files and subdirectories in a directory.DIR [pathname(s)] [display_format] [file_attributes] [sorted] [time] [options]
DISKPARTDisplays or configures Disk Partition properties.DISKPART
DOSKEYEdits command lines, recalls Windows commands, and creates macros.DOSKEY [options] [macroname=[text]]
DRIVERQUERYDisplays current device driver status and properties.driverquery [/s Computer] [/u Domain\User /p Password] [/fo {TABLE|LIST|CSV}] [/nh] [/v] [/si]
ECHODisplays messages, or turns command echoing on or off.ECHO [ON | OFF]
ECHO [message]
ECHO /?
ENDLOCALEnds localization of environment changes in a batch file.ENDLOCAL
ERASEDeletes one or more files.DEL [options] [/A:file_attributes] files_to_delete
EXITQuits the CMD.EXE program (command interpreter).EXIT [/B] [exitCode]
FCCompares two files or sets of files, and displays the differences between them.FC [options] [drive1:][path1] filename1 [drive2:][path2] filename2
FINDSearches for a text string in a file or files. FIND [/V] [/C] [/N] [/I] “string” [pathname(s)]
FINDSTRSearches for strings in files.FINDSTR string(s) [pathname(s)] [/R] [/C:”string“] [/G:StringsFile] [/F:file] [/D:DirList] [/A:color] [/OFF[LINE]] [options]
FORRuns 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
FORMATFormats 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]
FSUTILDisplays or configures the file system properties. 
FTYPEDisplays or modifies file types used in file extension associations.Syntax FTYPE fileType=executable_path
FTYPE FTYPE fileType FTYPE fileType=
GOTODirects the Windows command interpreter to a labeled line in a batch program. GOTO label
GPRESULTDisplays 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]]
GRAFTABLEnables Windows to display an extended character set in graphics mode. None
HELPProvides Help information for Windows commands.WINHELP [options] helpfile.hlp WINHLP32.exe [options] helpFile
ICACLSDisplay, modify, backup, or restore ACLs for files and directories. None
IFPerforms 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
LABELCreates, changes, or deletes the volume label of a disk.GOTO label
GOTO:eof
MDCreates a directory.MD [drive:]path [[drive:]path…]
MKDIRCreates a directory.MD [drive:]path [[drive:]path…]
MKLINKCreates Symbolic Links and Hard LinksMKLINK [[/D] | [/H] | [/J]] LinkName Target
MODEConfigures a system device.Device Status: MODE [device] [/STATUS]
MOREDisplays 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)]
MOVEMoves one or more files from one directory to another directory.MOVE [options] [Source] [Target]
OPENFILESDisplays 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]
PATHDisplays or sets a search path for executable files.PATH pathname [;pathname] [;pathname] [;pathname]…
PATH
PATH ;
PAUSESuspends processing of a batch file and displays a message.PAUSE
POPDRestores the previous value of the current directory saved by PUSHD.POPD
PRINTPrints a text file.PRINT [/D:device] [pathname(s)]
PROMPTChanges the Windows command prompt.PROMPT [text]
PUSHDSaves the current directory then changes it.PUSHD [drive]path
RDRemoves a directory.RD pathname
RD /S pathname
RD /S /Q pathname
RECOVERRecovers readable information from a bad or defective disk.RECOVER [drive:][path]filename
REMRecords 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
RENRenames a file or files.REN [drive:][path]SourceMask TargetMask
RENAMERenames a file or files.REN [drive:][path]SourceMask TargetMask
REPLACEReplaces files.%variable:StrToFind=NewStr%
%~[param_ext]$variable:Param
RMDIRRemoves a directory.RD pathname R
D /S pathname
RD /S /Q pathname
ROBOCOPYAdvanced utility to copy files and directory treesROBOCOPY Source_folder Destination_folder [files_to_copy] [options]
SETDisplays, 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 “
SETLOCALBegins localization of environment changes in a batch file.SETLOCAL
SETLOCAL {EnableDelayedExpansion | DisableDelayedExpansion} {EnableExtensions | DisableExtensions}
SCDisplays or configures services (background processes). SC [\\server] [command] [service_name] [Options]
SCHTASKSSchedules 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
SHIFTShifts the position of replaceable parameters in batch files.SHIFT [/n]
SHUTDOWNAllows proper local or remote shutdown of machine.SHUTDOWN [shutdown_options] [/m \\Computer] [other_options]
SORTSorts input.SORT [options]
STARTStarts a separate window to run a specified program or command.START “title” [/D path] [options] “command” [parameters]
SUBSTAssociates a path with a drive letter. SUBST drive_letter: path
SUBST
SUBST drive_letter: /D
SYSTEMINFODisplays machine specific properties and configuration.SYSTEMINFO [/S system [/U username [/P [password]]] ] [/FO format] [/NH]
TASKLISTDisplays all currently running tasks including services.Tasklist options
TASKKILLKill or stop a running process or application.TASKKILL [/S system [/U username [/P [password]]]] { [/FI filter] [/PID processid | /IM imagename] } [/F] [/T]
TIMEDisplays or sets the system time.TIME [new_time]
TIME
TIME /T
TITLESets the window title for a CMD.EXE session.TITLE [string]
TREEGraphically displays the directory structure of a drive or path.TREE [drive:][path] [/F] [/A]
TYPEDisplays the contents of a text file.TYPE [drive:]pathname(s)
VERDisplays the Windows version.VER
VERIFYTells Windows whether to verify that your files are written correctly to a disk.VERIFY [ON | OFF]
VOLDisplays a disk volume label and serial number.VOL [drive:[drive:]]
XCOPYCopies files and directory trees.XCOPY source [destination] [options]
WMICDisplays WMI information inside interactive command shellWMIC [global_switch(s)] Alias [options] [format] WMIC [global_switch(s)] Command WMIC [global_switch:value] [global_switch:value] Command WMIC CONTEXT Interactive mode: WMIC
Tabel Perintah CMD
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 

admin

giginau

Tinggalkan Balasan