0% found this document useful (0 votes)
77 views11 pages

CMD ( ( (X) ) )

Uploaded by

Kumar Maratha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views11 pages

CMD ( ( (X) ) )

Uploaded by

Kumar Maratha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 11

------(Cmd)[X]

Cmd is a default powerfull and basic prompt text editor and executable command
interpreter used for perfoming all functions which are done using graphical
interface,
helping in many purposes like coding,application development,hacking etc
It is based on C programing language

<{CMD can be opened in many ways eg.


1.)open search bar or type windows key + s and type cmd or command prompt
2.)type windows key + r and type cmd
After opening it will usually show

Microsoft Windows [Version X] (X is your computer's version)


(c) Microsoft Corporation. All rights reserved.

c:\users\XYZ>
(Depending on cmd's location)
CMD has a lot of commands with different functions and different requierments.
Type help for more information.
IT will show some commands and their functions.

For more information on a specific command, type HELP command-name


ASSOC Displays or modifies file extension associations.
ATTRIB Displays or changes file attributes.
BREAK Sets or clears extended CTRL+C checking.
BCDEDIT Sets properties in boot database to control boot loading.
CACLS Displays or modifies access control lists (ACLs) of files.
CALL Calls one batch program from another.
CD Displays the name of or changes the current directory.
CHCP Displays or sets the active code page number.
CHDIR Displays the name of or changes the current directory.
CHKDSK Checks a disk and displays a status report.
CHKNTFS Displays or modifies the checking of disk at boot time.
CLS Clears the screen.
CMD Starts a new instance of the Windows command interpreter.
COLOR Sets the default console foreground and background colors.
COMP Compares the contents of two files or sets of files.
COMPACT Displays or alters the compression of files on NTFS partitions.
CONVERT Converts FAT volumes to NTFS. You cannot convert the
current drive.
COPY Copies one or more files to another location.
DATE Displays or sets the date.
DEL Deletes one or more files.
DIR Displays a list of files and subdirectories in a directory.
DISKPART Displays or configures Disk Partition properties.
DOSKEY Edits command lines, recalls Windows commands, and
creates macros.
DRIVERQUERY Displays current device driver status and properties.
ECHO Displays messages, or turns command echoing on or off.
ENDLOCAL Ends localization of environment changes in a batch file.
ERASE Deletes one or more files.
EXIT Quits the CMD.EXE program (command interpreter).
FC Compares two files or sets of files, and displays the
differences between them.
FIND Searches for a text string in a file or files.
FINDSTR Searches for strings in files.
FOR Runs a specified command for each file in a set of files.
FORMAT Formats a disk for use with Windows.
FSUTIL Displays or configures the file system properties.
FTYPE Displays or modifies file types used in file extension
associations.
GOTO Directs the Windows command interpreter to a labeled line in
a batch program.
GPRESULT Displays Group Policy information for machine or user.
GRAFTABL Enables Windows to display an extended character set in
graphics mode.
HELP Provides Help information for Windows commands.
ICACLS Display, modify, backup, or restore ACLs for files and
directories.
IF Performs conditional processing in batch programs.
LABEL Creates, changes, or deletes the volume label of a disk.
MD Creates a directory.
MKDIR Creates a directory.
MKLINK Creates Symbolic Links and Hard Links
MODE Configures a system device.
MORE Displays output one screen at a time.
MOVE Moves one or more files from one directory to another
directory.
OPENFILES Displays files opened by remote users for a file share.
PATH Displays or sets a search path for executable files.
PAUSE Suspends processing of a batch file and displays a message.
POPD Restores the previous value of the current directory saved by
PUSHD.
PRINT Prints a text file.
PROMPT Changes the Windows command prompt.
PUSHD Saves the current directory then changes it.
RD Removes a directory.
RECOVER Recovers readable information from a bad or defective disk.
REM Records comments (remarks) in batch files or CONFIG.SYS.
REN Renames a file or files.
RENAME Renames a file or files.
REPLACE Replaces files.
RMDIR Removes a directory.
ROBOCOPY Advanced utility to copy files and directory trees
SET Displays, sets, or removes Windows environment variables.
SETLOCAL Begins localization of environment changes in a batch file.
SC Displays or configures services (background processes).
SCHTASKS Schedules commands and programs to run on a computer.
SHIFT Shifts the position of replaceable parameters in batch files.
SHUTDOWN Allows proper local or remote shutdown of machine.
SORT Sorts input.
START Starts a separate window to run a specified program or command.
SUBST Associates a path with a drive letter.
SYSTEMINFO Displays machine specific properties and configuration.
TASKLIST Displays all currently running tasks including services.
TASKKILL Kill or stop a running process or application.
TIME Displays or sets the system time.
TITLE Sets the window title for a CMD.EXE session.
TREE Graphically displays the directory structure of a drive or
path.
TYPE Displays the contents of a text file.
VER Displays the Windows version.
VERIFY Tells Windows whether to verify that your files are written
correctly to a disk.
VOL Displays a disk volume label and serial number.
XCOPY Copies files and directory trees.
WMIC Displays WMI information inside interactive command shell.
For more information on tools see the command-line reference in the online help.
<output of commands will depend on computer or system>

>assoc
Displays or modifies file extension associations

ASSOC [.ext[=[fileType]]]

.ext Specifies the file extension to associate the file type with
fileType Specifies the file type to associate with the file extension

Type ASSOC without parameters to display the current file associations.


If ASSOC is invoked with just a file extension, it displays the current
file association for that file extension. Specify nothing for the file
type and the command will delete the association for the file extension.

.386=vxdfile
.3g2=WMP11.AssocFile.3G2
.3gp=WMP11.AssocFile.3GP
.3gp2=WMP11.AssocFile.3G2
.3gpp=WMP11.AssocFile.3GP
.aac=WMP11.AssocFile.ADTS
.accountpicture-ms=accountpicturefile
.adt=WMP11.AssocFile.ADTS
.adts=WMP11.AssocFile.ADTS
.aif=WMP11.AssocFile.AIFF
.aifc=WMP11.AssocFile.AIFF
.aiff=WMP11.AssocFile.AIFF
.ani=anifile
.appcontent-ms=ApplicationContent
.application=Application.Manifest
.appref-ms=Application.Reference
.asa=aspfile
.asf=WMP11.AssocFile.ASF
.asp=aspfile
.asx=WMP11.AssocFile.ASX
.au=WMP11.AssocFile.AU
.avi=WMP11.AssocFile.AVI
.bat=batfile
.blg=Diagnostic.Perfmon.Document
.bmp=Paint.Picture
.cab=CABFolder
.camp=campfile
.cat=CATFile
.cda=WMP11.AssocFile.CDA
.cdmp=cdmpfile
.cdx=aspfile
.cdxml=Microsoft.PowerShellCmdletDefinitionXML.1
.cer=CERFile
.chk=chkfile
.chm=chm.file
.cmd=cmdfile
.com=comfile
.compositefont=Windows.CompositeFont
.cpl=cplfile
.crl=CRLFile
.crt=CERFile
.css=CSSfile
.cur=curfile
.db=dbfile
.dctx=IMEDictionaryCompiler
.dctxc=IMEDictionaryCompiler
.dds=ddsfile
.der=CERFile
.desklink=CLSID\{9E56BE61-C50F-11CF-9A2C-00A0C90A90CE}
.deskthemepack=desktopthemepackfile
.diagcab=Diagnostic.Cabinet
.diagcfg=Diagnostic.Config
.diagpkg=Diagnostic.Document
.dib=Paint.Picture
.dll=dllfile
.docx=docxfile
.drv=drvfile
.dsn=MSDASQL
.emf=emffile
.eml=Microsoft Email Message
.evt=evtfile
.evtx=evtxfile
.exe=exefile
.flac=WMP11.AssocFile.FLAC
.fon=fonfile
.gif=giffile
.gmmp=gmmpfile
.grp=MSProgramGroup
.hdd=progId_VirtualBox.Shell.hdd
.hlp=hlpfile
.hta=htafile
.htm=htmlfile
.html=htmlfile
.icc=icmfile
.icl=IconLibraryFile
.icm=icmfile
.ico=icofile
.igp=Intel.GraphicsControlPanel.igp.1
.imesx=imesxfile
.img=Windows.IsoFile
.inf=inffile
.ini=inifile
.iso=Windows.IsoFile
.jar=jarfile
.jfif=pjpegfile
.jnlp=JNLPFile
.Job=JobObject
.jod=Microsoft.Jet.OLEDB.4.0
.jpe=jpegfile
.jpeg=jpegfile
.jpg=jpegfile
.js=JSFile
.JSE=JSEFile
.jxr=wdpfile
.label=Label
.library-ms=LibraryFolder
.lnk=lnkfile
.log=txtfile
.m1v=WMP11.AssocFile.MPEG
.m2t=WMP11.AssocFile.M2TS
.m2ts=WMP11.AssocFile.M2TS
.m2v=WMP11.AssocFile.MPEG
.m3u=WMP11.AssocFile.m3u
.m4a=WMP11.AssocFile.M4A
.m4v=WMP11.AssocFile.MP4
.mapimail=CLSID\{9E56BE60-C50F-11CF-9A2C-00A0C90A90CE}
.mht=mhtmlfile
.mhtml=mhtmlfile
.mid=WMP11.AssocFile.MIDI
.midi=WMP11.AssocFile.MIDI
.mk3d=WMP11.AssocFile.MK3D
.mka=WMP11.AssocFile.MKA
.mkv=WMP11.AssocFile.MKV
.mlc=LpkSetup.1
.mod=WMP11.AssocFile.MPEG
.mov=WMP11.AssocFile.MOV
.mp2=WMP11.AssocFile.MP3
.mp2v=WMP11.AssocFile.MPEG
.mp3=WMP11.AssocFile.MP3
.mp4=WMP11.AssocFile.MP4
.mp4v=WMP11.AssocFile.MP4
.mpa=WMP11.AssocFile.MPEG
.mpe=WMP11.AssocFile.MPEG
.mpeg=WMP11.AssocFile.MPEG
.mpg=WMP11.AssocFile.MPEG
.mpv2=WMP11.AssocFile.MPEG
.ms-windows-store-license=WindowsStore.License
.msc=MSCFile
.msi=Msi.Package
.msp=Msi.Patch
.msrcincident=RemoteAssistance.1
.msstyles=msstylesfile
.msu=Microsoft.System.Update.1
.mts=WMP11.AssocFile.M2TS
.mydocs=CLSID\{ECF03A32-103D-11d2-854D-006008059367}
.nfo=MSInfoFile
.ocx=ocxfile
.odt=odtfile
.osdx=opensearchdescription
.otf=otffile
.ova=progId_VirtualBox.Shell.ova
.ovf=progId_VirtualBox.Shell.ovf
.p10=P10File
.p12=PFXFile
.p7b=SPCFile
.p7c=certificate_wab_auto_file
.p7m=P7MFile
.p7r=P7RFile
.p7s=P7SFile
.partial=IE.AssocFile.PARTIAL
.pbk=pbkfile
.perfmoncfg=Diagnostic.Perfmon.Config
.pfm=pfmfile
.pfx=PFXFile
.pif=piffile
.pko=PKOFile
.pnf=pnffile
.png=pngfile
.ppkg=Microsoft.ProvTool.Provisioning.1
.prf=prffile
.ps1=Microsoft.PowerShellScript.1
.ps1xml=Microsoft.PowerShellXMLData.1
.psc1=Microsoft.PowerShellConsole.1
.psd1=Microsoft.PowerShellData.1
.psm1=Microsoft.PowerShellModule.1
.pssc=Microsoft.PowerShellSessionConfiguration.1
.py=Python.File
.pyc=Python.CompiledFile
.pyd=Python.Extension
.pyo=Python.CompiledFile
.pyw=Python.NoConFile
.pyz=Python.ArchiveFile
.pyzw=Python.NoConArchiveFile
.qds=SavedDsQuery
.rat=ratfile
.RDP=RDP.File
.reg=regfile
.resmoncfg=Diagnostic.Resmon.Config
.rle=rlefile
.rll=dllfile
.rmi=WMP11.AssocFile.MIDI
.rtf=rtffile
.scf=SHCmdFile
.scp=txtfile
.scr=scrfile
.sct=scriptletfile
.search-ms=SearchFolder
.searchConnector-ms=SearchConnectorFolder
.settingcontent-ms=SettingContent
.sfcache=RDBFileProperties.1
.snd=WMP11.AssocFile.AU
.spc=SPCFile
.sst=CertificateStoreFile
.svg=svgfile
.symlink=.symlink
.sys=sysfile
.theme=themefile
.themepack=themepackfile
.tif=TIFImage.Document
.tiff=TIFImage.Document
.ts=WMP11.AssocFile.TTS
.ttc=ttcfile
.ttf=ttffile
.tts=WMP11.AssocFile.TTS
.txt=txtfile
.UDL=MSDASC
.URL=InternetShortcut
.VBE=VBEFile
.vbox=progId_VirtualBox.Shell.vbox
.vbox-extpack=progId_VirtualBox.Shell.vbox-extpack
.vbs=VBSFile
.vdi=progId_VirtualBox.Shell.vdi
.vhd=progId_VirtualBox.Shell.vhd
.vhdpmem=Windows.VhdPmemFile
.vhdx=Windows.VhdFile
.vmdk=progId_VirtualBox.Shell.vmdk
.vxd=vxdfile
.wab=wab_auto_file
.wav=WMP11.AssocFile.WAV
.wax=WMP11.AssocFile.WAX
.wbcat=wbcatfile
.wcx=wcxfile
.wdp=wdpfile
.webpnp=webpnpFile
.website=Microsoft.Website
.wm=WMP11.AssocFile.ASF
.wma=WMP11.AssocFile.WMA
.WMD=WMP11.AssocFile.WMD
.wmdb=WMP.WMDBFile
.wmf=wmffile
.WMS=WMP11.AssocFile.WMS
.wmv=WMP11.AssocFile.WMV
.wmx=WMP11.AssocFile.ASX
.wmz=WMP11.AssocFile.WMZ
.wpl=WMP11.AssocFile.WPL
.wsc=scriptletfile
.WSF=WSFFile
.WSH=WSHFile
.wtx=txtfile
.wvx=WMP11.AssocFile.WVX
.xaml=Windows.XamlDocument
.xbap=Windows.Xbap
.xht=xhtmlfile
.xhtml=xhtmlfile
.xml=xmlfile
.xrm-ms=MSSppLicenseFile
.xsl=xslfile
.ZFSendToTarget=CLSID\{888DCA60-FC0A-11CF-8F0F-00C04FD7D062}
.zip=CompressedFolder

>attrib
Displays or changes file attributes.

ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] [+O | -O] [+I | -I] [+X | -X] [+P |
-P] [+U | -U]
[drive:][path][filename] [/S [/D]] [/L]

+ Sets an attribute.
- Clears an attribute.
R Read-only file attribute.
A Archive file attribute.
S System file attribute.
H Hidden file attribute.
O Offline attribute.
I Not content indexed file attribute.
X No scrub file attribute.
V Integrity attribute.
P Pinned attribute.
U Unpinned attribute.
B SMR Blob attribute.
[drive:][path][filename]
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.
/L Work on the attributes of the Symbolic Link versus
the target of the Symbolic Link
>cd
Displays the name of or changes the current directory.

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.

>cls
cleans the screen erasing all output data

>cmd
starts a new instance of command interpreter
>start <object>
starts selected object or program
If location of selected app is given in environment variables

>color
Sets the default console foreground and background colors.

COLOR [attr]

attr Specifies color attribute of console output

Color attributes are specified by TWO hex digits -- the first


corresponds to the background; the second the foreground. Each digit
can be any of the following values:

0 = Black 8 = Gray
1 = Blue 9 = Light Blue
2 = Green A = Light Green
3 = Aqua B = Light Aqua
4 = Red C = Light Red
5 = Purple D = Light Purple
6 = Yellow E = Light Yellow
7 = White F = Bright White
If no argument is given, this command restores the color to what it was
when CMD.EXE started. This value either comes from the current console
window, the /T command line switch or from the DefaultColor registry
value.

The COLOR command sets ERRORLEVEL to 1 if an attempt is made to execute


the COLOR command with a foreground and background color that are the
same.

Example: "COLOR fc" produces light red on bright white

>date
Displays or sets the date.
DATE [/T | date]

Type DATE without parameters to display the current date setting and
a prompt for a new one. Press ENTER to keep the same date.

If Command Extensions are enabled the DATE command supports


the /T switch which tells the command to just output the
current date, without prompting for a new date.

>DEL or erase
Deletes one or more files.

DEL [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names


ERASE [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names

names Specifies a list of one or more files or directories.


Wildcards may be used to delete multiple files. If a
directory is specified, all files within the directory
will be deleted.

/P Prompts for confirmation before deleting each file.


/F Force deleting of read-only files.
/S Delete specified files from all subdirectories.
/Q Quiet mode, do not ask if ok to delete on global wildcard
/A Selects files to delete based on attributes
attributes R Read-only files S System files
H Hidden files A Files ready for archiving
I Not content indexed Files L Reparse Points
O Offline files - Prefix meaning not

If Command Extensions are enabled DEL and ERASE change as follows:

The display semantics of the /S switch are reversed in that it shows


you only the files that are deleted, not the ones it could not find.

>DIR
Displays a list of files and subdirectories in a directory.
DIR [drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L] [/N]
[/O[[:]sortorder]] [/P] [/Q] [/R] [/S] [/T[[:]timefield]] [/W] [/X] [/4]

[drive:][path][filename]
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 I Not content indexed files
L Reparse Points O Offline 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.
/R Display alternate data streams 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.

>DISKPART
Displays or configures Disk Partition properties.
Microsoft DiskPart version 10.0.19041.964

ACTIVE - Mark the selected partition as active.


ADD - Add a mirror to a simple volume.
ASSIGN - Assign a drive letter or mount point to the selected volume.
ATTRIBUTES - Manipulate volume or disk attributes.
ATTACH - Attaches a virtual disk file.
AUTOMOUNT - Enable and disable automatic mounting of basic volumes.
BREAK - Break a mirror set.
CLEAN - Clear the configuration information, or all information, off the
disk.
COMPACT - Attempts to reduce the physical size of the file.
CONVERT - Convert between different disk formats.
CREATE - Create a volume, partition or virtual disk.
DELETE - Delete an object.
DETAIL - Provide details about an object.
DETACH - Detaches a virtual disk file.
EXIT - Exit DiskPart.
EXTEND - Extend a volume.
EXPAND - Expands the maximum size available on a virtual disk.
FILESYSTEMS - Display current and supported file systems on the volume.
FORMAT - Format the volume or partition.
GPT - Assign attributes to the selected GPT partition.
HELP - Display a list of commands.
IMPORT - Import a disk group.
INACTIVE - Mark the selected partition as inactive.
LIST - Display a list of objects.
MERGE - Merges a child disk with its parents.
ONLINE - Online an object that is currently marked as offline.
OFFLINE - Offline an object that is currently marked as online.
RECOVER - Refreshes the state of all disks in the selected pack.
Attempts recovery on disks in the invalid pack, and
resynchronizes mirrored volumes and RAID5 volumes
that have stale plex or parity data.
REM - Does nothing. This is used to comment scripts.
REMOVE - Remove a drive letter or mount point assignment.
REPAIR - Repair a RAID-5 volume with a failed member.
RESCAN - Rescan the computer looking for disks and volumes.
RETAIN - Place a retained partition under a simple volume.
SAN - Display or set the SAN policy for the currently booted OS.
SELECT - Shift the focus to an object.
SETID - Change the partition type.
SHRINK - Reduce the size of the selected volume.
UNIQUEID - Displays or sets the GUID partition table (GPT) identifier or
master boot record (MBR) signature of a disk.
>driverquery
DRIVERQUERY [/S system [/U username [/P [password]]]]
[/FO format] [/NH] [/SI] [/V]
Description:
Enables an administrator to display a list of
installed device drivers.

Parameter List:
/S system Specifies the remote system to connect to.

/U [domain\]user Specifies the user context


under which the command should execute.

/P [password] Specify the password for the given


user context.

/FO format Specifies the type of output to display.


Valid values to be passed with the
switch are "TABLE", "LIST", "CSV".

/NH Specifies that the "Column Header"


should not be displayed. Valid for
"TABLE" and "CSV" format only.

/SI Provides information about signed drivers.

/V Displays verbose output. Not valid


for signed drivers.

/? Displays this help message.

Examples:
DRIVERQUERY
DRIVERQUERY /FO CSV /SI
DRIVERQUERY /NH
DRIVERQUERY /S ipaddress /U user /V
DRIVERQUERY /S system /U domain\user /P password /FO LIST

You might also like