IT tutorials
 
Windows
 

Windows Server 2008 : Basic Rules When Using the Command Prompt - Understanding Wildcards, Getting Help

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
6/7/2013 7:25:51 PM

1. Understanding Wildcards

Wildcards are used to represent one or more characters. Two wildcard characters are available at the command prompt: the asterisk and the question mark.

WildcardDescription
*Takes the place for zero or more characters.
C:\>dir *.txt

Shows all files that end with .txt.
C:\>dir a*

Shows all files that start with A.
C:\>dir a*.txt

Shows all files that start with A and end with .txt.
?Takes the place for one character.
C:\>dir week?.txt

Shows all .txt files that start with week and end with one character and .txt (such as week1.txt, week2.txt, and so on).

Note

The dir command provides a listing of files in the current directory.

2. Getting Help

The command prompt includes a lot of built-in help if you know how to use it. For example, if you enter just Help, you’ll get a list of commands that you can enter at the command line. The following table shows some of these commands.

CommandDescription
assocDisplays or modifies file extension associations.
attribSets and displays attributes for files.
bcdeditSets properties in the boot configuration data store to control the boot process.
callCalls one batch program from another.
cd or chdirDisplays the name of a directory when entered alone, or changes the current directory when a path is given.
chkdskChecks a disk and displays a status report, and can also repair disk errors.
compactDisplays or alters the compression of files on NTFS partitions.
convertConverts FAT volumes to NTFS. You cannot convert the current drive without rebooting. Also, you cannot convert from NTFS to FAT without reformatting.
copyCopies one or more files to another location.
dateDisplays or sets the date.
del or eraseDeletes one or more files.
dirDisplays a list of files and subdirectories in a directory.
diskpartDisplays or configures disk partition properties.
doskeyEdits command lines, recalls Windows commands, and creates macros.
driverqueryDisplays the current device driver status and properties.
echoDisplays messages or turns command echoing on or off.
exitQuits the CMD.EXE program (command interpreter).
forRuns a specified command for each file in a set of files.
formatFormats a disk for use with Windows.
fsutilDisplays or configures the file system properties.
ftypeDisplays or modifies file types used in file extension associations.
gotoDirects the Windows command interpreter to a labeled line in a batch program.
gpresultDisplays Group Policy information that is applied to the local system.
helpProvides Help information for Windows commands.
icaclsDisplays, modifys, backs up, or restores access control lists (ACL) for files and directories.
ifPerforms conditional processing in batch programs.
labelCreates, changes, or deletes the volume label of a disk.
md or mkdirCreates a directory.
moreDisplays output one screen at a time.
pathDisplays or sets a search path for executable files.
rd or rmdirRemoves a directory.
remRecords comments (remarks) in batch files or CONFIG.SYS.
ren or renameRenames a file or files.
robocopyAdvanced robust copy utility used to copy files and directory trees.
setDisplays, sets, or removes Windows environment variables.
scDisplays or configures services (background processes).
schtasksSchedules commands and programs to run on a computer.
shutdownAllows proper local or remote shutdown of a machine.
systeminfoDisplays machine-specific properties and configuration.
tasklistDisplays all currently running tasks including services.
taskkillKills or stops a running process or application.
timeDisplays or sets the system time.
treeGraphically displays the directory structure of a drive or path.
xcopyCopies files and directory trees.
wmicDisplays Windows Management Instrumentation (WMI) information inside an interactive command shell.

Note

The help doesn’t show all commands that are available at the command prompt. For example, the dsacls command doesn’t appear but can be used to display or modify ACLs for Active Directory Domain Services objects. 


There are two ways you can get help for individual commands. You can use the /? switch or enter help followed by the command; however, only the /? switch method works consistently.

CommandDescription
/?
C:\>sc /?

Using the /? switch provides help for any command.
help command
C:\>help sc

Some commands provide help by entering the word help followed by the command
C:\>help dsacls
This command is not supported by the help utility. Try "dsacls /?".

This fails and generates the error.

When you ask for help on any commands, you’ll see a lot of help is available; however, you need to know how to read it. The following table outlines the conventions used in the help output.

Help NotationDescriptionExample
Text without brackets or bracesItems you must type as shownipconfig [/allcompartments] [/all] [/renew[adapter]] [/release[adapter]] [/renew6[adapter]] [/release6[adapter]] [/flushdns] [/displaydns] [/registerdns] [/showclassidadapter] [/setclassidadapter [classid]] ipconfig is without brackets, so it must be entered as ipconfig.
[Text inside square brackets]Optional itemsecho [message] The message is in brackets [], indicating it is optional. In other words, you can enter echo to see whether echo is turned on or off for the system, or you can enter echo with a message to echo to the screen.
<Text inside angle brackets>Placeholder for which you must supply a valueecho [message] You provide the message. For example, you can enter echo %programfiles% to view the value of the variable.
{Text inside braces}Set of required items; choose onegpupdate [/target:{computer | user}] [/force] [/wait:<value>] [/logoff] [/boot] [/sync] If /target is used, the user must enter either computer or user. In this case, /target is optional and if it is omitted, it executes against both the computer and the user.
Vertical bar (|)Separator for mutually exclusive items; choose onegpresult [/s system [/u username [/p [password]]]] [/scope scope] [/user targetusername] [/r | /v | /z] [(/x | /h) <filename> [/f]] Several items in this command cannot be used with others, so they are grouped together in the brackets and separated with the vertical bar. If you want to use /r, /v, or /z, you must choose only one. Similarly, if you want to use /x or /h, you must choose only one.
Ellipsis (...)Items that can be repeatedwinrm operation resource_uri [-switch:value [-switch:value] ...] [@{key=value[;key=value]...}] The ellipsis indicates that multiple switch values and multiple key values can be entered in the same line.
 
Others
 
- Windows Small Business Server 2011 : Windows Storage Server 2008 R2 Essentials (part 2) - Connecting to Windows Storage Server 2008 R2 Essentials
- Windows Small Business Server 2011 : Windows Storage Server 2008 R2 Essentials (part 1) - Connecting Windows Storage Server Essentials to the SBS Domain
- Windows Small Business Server 2011 : Using the Command Line to Manage Backups
- Windows 8 : Security - Securing Internet Explorer
- Windows 8 : Security - Encrypting File System
- Windows 8 : Security - BitLocker Drive Encryption
- Windows Vista : Deployment Platform - Basic Deployment Process, BDD 2007 Deployment Process
- Windows Vista : Platform Components (part 2) - Windows Setup, Sysprep, Windows PE, Windows DS, ImageX
- Windows Vista : Platform Components (part 1) - Windows Imaging, Answer Files, Windows SIM
- Windows 7 : Using the Default Programs Page (part 2) - Change AutoPlay settings, Set program access and computer defaults
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us