Партнерка на США и Канаду по недвижимости, выплаты в крипто
- 30% recurring commission
- Выплаты в USDT
- Вывод каждую неделю
- Комиссия до 5 лет за каждого referral
The parameter [/a|/b] indicates whether the file is ASCII (/a switch) or binary (/b switch). The default value is binary when copying and ASCII when combining. When the [/a|/b] switch is entered before the name of the source file, all items that follow use that flag until a different [/a|/b] switch is entered. This new switch applies to the source file that immediately precedes it as well as to any source files that follow it. Placement of the /a or /b after the source file or the destination file results in different copy procedures, as explained in Table A.35.
Table A.35. copy Options | ||
Option | Used after the source-file | Used after the dest-file |
/a | Copies all data in the file up to the first end-of-file character. The end-of-file character is not copied. The data is considered to be in ASCII format. | Adds an end-of-file character to the end of the dest-file as the last character. |
/b | Copies all data in the file including the end-of-file character. The data is considered to be in binary format. | Does not add an end-of-file character to the end of the dest-file. |
When the dest-file is a device, the /b switch should be used so that special control characters are copied to it as data. If the /a switch is used in this instance, the ASCII copy might cause those control characters to be interpreted, providing unpredictable results.
Four additional options are available, indicated in the syntax line as options, and defined in Table A.36.
copy Command Examples
To copy the file Budget. xls, which exists on the C: drive, to the directory d:\financial\year2000, enter the following:
copy budget. xls d:\financial\year2000
Table A.36. copy Command Options | |
Option | Description |
/n | Uses the MS-DOS file name format of filename. ext when copying files with longer names. |
/v | Verifies each file copied. If an error occurs, a message is displayed. This switch causes the copy command to execute more slowly. |
/y | Suppresses the prompt to overwrite an existing file. |
/z | Copies networked files so that they are in restart mode. |
If you want to copy an ASCII file up to the first end-of-file character and output it to a file with the end-of-file character added, enter
copy demo. txt /a newdemo. txt /a
COMBINING FILES WITH THE COPY COMMAND
To instruct the copy command to combine files, enter multiple source files separated by plus signs. Remember that the default file type is considered ASCII when combining files. For binary files, you must enter the /b switch. The syntax for combining files is
copy [/a|/b] source-file1 [+ source-file2 [/a|/b] [+ source-file...]]
dest-file [/a|/b] options
Wildcard characters can also be used to designate multiple files to be combined.
A special use of the plus sign parameter allows the user to update the date and time of the file to the current date and time without changing the file's contents. The syntax is
copy [/a|/b] source-file+ ,,
COPY COMMAND EXAMPLES USING THE COMBINING OPTION
Suppose that a department manager wants to combine all of her employees' monthly status reports for April into one file. She enters
copy grwapr. rpt + ebgapr. rpt + eegapr. rpt April. rpt
If all of the above files were in the same directory, a variation of this command could be entered:
copy *apr. rpt April. rpt
XCOPY COMMAND
The xcopy command is more comprehensive than the copy command; it allows the user to copy not only files and directories but also subdirectories. The syntax is
xcopy source-file [dest-file]
[options]
The source-file parameter represents the names of the files to be copied and their locations. It must include either a drive designation or a directory path.
The dest-file parameter is the destination of the files to be copied and may include the file name as well as the drive designation and the directory path as necessary. Specifying the dest-file is optional, and if it's not included, the source files are copied to the current drive and directory. The destination files automatically have the archive attribute set.
xcopy Command Example
To copy the directory budget and all of its files and subdirectories to the year2000 directory, creating a directory named budget at the same time, enter
xcopy \budget \year2000 /i/s/e
The /i switch will create a directory named budget under this directory, copying both files and subdirectories; the /e switch will ensure that empty subdirectories get copied as well. See Table A.37 for options.
MOVING FILES
To move a file using the drag-and-drop method in Windows Server 2003 Explorer:
1. Display the file in the Contents of pane.
2. Make sure that the destination directory is visible in the All Folders pane. (Or start another copy of Explorer and display the destination directory in the Contents of pane.)
3. Select the file you wish to move.
4. Drag the file to its new destination if it is on the same disk as its current location. Otherwise, hold down the SHIFT key while dragging the file to force the move. If the SHIFT key is not held down, the file will be copied, not moved.
Remember, to select multiple files, hold down the CTRL key while selecting. To use the menu bar in Windows Server 2003 Explorer to do this:
1. Select the files.
2. Select Edit
Cut or press CTRL+X.
3. Select the destination directory.
4. Select Edit
Paste or press CTRL+V.
move Command
The move command actually moves files from one directory to another so that they no longer exist in their original location. The syntax is
move source-file(s) dest-file
The source-file(s) parameter indicates the files that you wish to move. It can be just the file name or it can include the drive designation and directory as necessary. Wildcard characters can be used to move multiple files.
Table A.37. xcopy Command Options | ||
Option | Qualifier | Description |
/a | Copies only those source-files with the Archive attribute set. Using this switch does not cause the Archive attribute to change. | |
/d | :date | Copies only those files with a modification date the same as or after the :date qualifier, which is in the format of MM-DD-YY. The :date qualifier is optional; if it is not used, only those files that are more recent than any existing destination files are copied. |
/e | Must be used with the /s and /t options and allows empty subdirectories to be copied as well as those containing files. | |
/exclude | :filename | Excludes from copying the files contained in filename. Filename is a file that can contain one pattern per line without the use of wildcard characters. A file is not copied when any portion of the source-file parameter matches a line in filename. |
/i | Creates a directory called dest-file, if the source-file contains wildcards or if the source-file is a directory and if dest-file does not exist. Then copies all source-files to the dest-file directory. When not set, the xcopy command prompts the user to identify the dest-file as a file (F) or a directory (D). | |
/k | Copies the source-files without changing the Read-Only attribute. Automatically removes the Read-Only attribute whenever this option is not used. | |
/n | Copies files using the short file name format of filename. ext. This is required when copying files to a system that can only handle shorter file names. | |
/p | Displays a confirmation prompt prior to creating the destination file. | |
/q | Does not display messages. | |
/r | Enables the command to copy over read-only files. | |
/s | Copies both directories and subdirectories, except empty ones. When omitted, subdirectories are not copied. | |
/t | Does not copy files under subdirectories but only the subdirectories themselves. Must be used with the /e switch to copy empty subdirectories. | |
/u | The update option. When used, it will copy only files that already exist at the destination, thereby updating them. | |
/v | Verifies each new file. | |
/w | Displays a message that requires the user to press any key to start the copy process. | |
/x | Copies file auditing settings. | |
/y /-y | Suppresses prompting before overwriting a file; - y forces the prompt. | |
/z | Copies files over the network in restartable mode. |
The dest-file parameter represents the new location. It too can be a new file name or it can include a new drive designation or new directory path as necessary. Wildcard characters can be used here as well, such as when you need to change the extensions on a number of file names.
RENAMING FILES OR FOLDERS
To rename a file using Windows Server 2003 Explorer:
1. Select the file or folder.
2. From the menu bar select File
Rename.
3. Enter the new name for the file or folder.
or
1. Select the file or folder by right-clicking to display a menu.
2. Select Rename.
3. Enter the new name for the file or folder.
RENAME COMMAND
The rename, or ren, command permits changing the name of a file or directory without changing its location. In other words, file names cannot be changed across drives or directories with this command. For that, you need the copy or move command. The syntax for both formats of rename is
rename oldfile newfile
or
ren oldfile newfile
The oldfile parameter is the name of the file you wish to change and may include the drive designation and directory path. The newfile parameter is the new name for the file and may not include a drive or path. If a file already exists with the new file name, an error will be displayed. Wildcard characters can be used in names of both old files and new files.
Determining File Type
Windows Server 2003 Explorer will automatically attempt to identify a file type, which is displayed in the Type column of the Contents of pane as long as a detailed view is selected (View
Details). Another method of displaying the file type is to select File
Properties
General. You can also select the file with the right mouse button and then select Properties
General.
FILE-MANIPULATION COMMANDS
Several commands may be entered at the command prompt that allow the manipulation of files, such as attrib, copy, and sort. Attrib permits the user to change file attributes; copy permits the user to combine files; and sort sorts data. The attrib and sort commands are discussed below; copy was discussed in the "File-Management Commands" section.
assoc Command
The assoc command displays and changes the file name extension that is associated with a file type or application. The syntax it uses is
assoc [.ext[=[filetype]]]
To view the associated extension of file type .doc
Type assoc. doc
attrib Command
The attrib command allows the user to either display or change a file's attributes—Archive, Hidden, Read-Only, Compressed, and System (Compressed is available only on NTFS file systems and cannot be altered using this command). The syntax is
attrib [attributes] filename [/s]
Neither the attributes parameter nor the /s switch is entered to display the attributes associated with a particular file. Instead, the syntax is attrib filename. The filename parameter is the name of the file with the drive designation and path included where necessary. The /s switch is used when setting or changing attributes and instructs the command to change not only the files in the current directory but also those in the subdirectories. As with most commands, the wildcard characters * and? may be used to designate multiple files to change.
Table A.38 identifies the acceptable values for the attributes parameter. More than one attribute can be set within a single command, but if the system or hidden attribute is set, it must be removed before any other attribute can be modified.
ATTRIB COMMAND EXAMPLE
To add the Archive attribute to all the files in the current directory, enter
attrib +a *.*
Table A.38. Attribute Values | |
Attribute | Description |
+a | Adds the Archive attribute. |
-a | Removes the Archive attribute. |
+h | Adds the Hidden attribute. |
-h | Removes the Hidden attribute. |
+r | Adds the Read-Only attribute. |
-r | Removes the Read-Only attribute. |
+s | Adds the System attribute. |
-s | Removes the System attribute. |
SORT COMMAND
The sort command sorts the input data and outputs the result to the screen, a file, or a device. It also accepts input from another command, from a file, or from data entered on the terminal screen. The syntax of sort can be one of the following:
sort options < infilename > outfilename
command | sort options > outfilename
The infilename parameter is the name of the file that contains the data to be sorted. The drive designation and directory path may be entered as necessary. The outfilename parameter is the name of the file that contains the sorted data. Once again, the drive designation and directory path may be entered if needed. The command parameter is a command whose output will be sorted by sort. Two options are available as shown in Table A.39.
If the command or infilename parameters are omitted, the sort command will take input as the user enters it on the screen until a CTRL+Z+ENTER sequence is encountered. If the outfilename parameter is omitted, the sorted data will display on the screen.
Table A.39. sort Command Options | |
Option | Description |
/+n | Sorts the data based on the character in column n. The default sort is based on the character in column 1. |
/r | Executes a reverse sort either in reverse alphabetical or reverse numerical order |
MISCELLANEOUS COMMANDS
The following commands do not fit neatly into a broader category, so we have placed them in a miscellaneous group simply for editorial convenience.
cacls Command
The CACLS command-line utility displays and modifies a file's access control list (ACL). See Table A.40 for options. The syntax is
cacls filename [/option] [permissions]
Converting to NTFS
Windows Server 2003 can run on FAT and FAT32 file systems, but using NTFS has advantages. You do not have to reinstall the OS to change a file system to NTFS, but once you do, you cannot change it back.
CONVERT COMMAND
The convert command will change an existing FAT or FAT32 file system volume to NTFS. The current active drive cannot be converted during the present session with convert but only at the next system reboot. The syntax is
convert [drive:] /fs:ntfs [/v]
Table A.40. cacls Command Options | ||
Option | Qualifier | Description |
/e | Edits rather than replaces the ACL. | |
/c | Makes changes even if errors are found. | |
/g | User:perm | Grants special rights to the specified user. |
/t | Changes the ACL in the defined files and all subdirectories. | |
n | No permission. | |
r | Read permission. | |
c | Change or Write permission. | |
f | Full Control permission. | |
/r | User | Revokes the rights of a specified user. |
/p | User | Replaces the permissions of specified users with new ones. |
Setting and Displaying Date and Time
To display the current date, move the cursor to the time display in the bottom right corner of the taskbar. To modify this date, double-click on the time to bring up the Date/Time Properties window (Figure A.6). On the Date/Time tab, you can change the current date as well as view a calendar for the month and year selected. You can also modify the time from this window. An alternative way to display the Date/Time Properties window is by selecting Start
Settings
Control Panel
Date/Time.
Figure A.6. Date/Time Properties Windows

To change the format of a date or time display, select Start
Settings
Control Panel
Regional Settings. Once in the Regional Settings Properties window, select either the Date or the Time tab as appropriate. Within these tabs, you can, for example, change the time format to a 24-hour clock or change the date to the format yy/mm/dd. Another method of displaying the date and time is by selecting Start
Programs
Accessories
Clock.
The command line also offers options to assist in displaying and changing the date and time. These are discussed below.
DATE COMMAND
The date command allows the user to either display or change the date. The syntax is
date [mm-dd-yy]
If the mm-dd-yy parameter is omitted, the current system date is displayed. If not, the date is set to the value you enter. Acceptable values for the month, or mm, parameter are 1 through 12; for the day, or dd, parameter, 1 through 31. The year, or yy, parameter can be 80 through 99 or 1980 through 2099. If you prefer not to use dashes to separate the month, day, and year, parameters can be replaced with either a period (.) or a slash (/).
TIME COMMAND
The time command allows the user to either display or change the system time. The syntax is
time [hrs:[min[:sec[.hun]]]][AP]
When no parameters are entered, the current system time is displayed, which you can change if necessary. If you do not enter a new time, just press ENTER. If you do, use the syntax identified in Table A.41.
NET TIME COMMAND
The net time command allows a user to synchronize the time on her current system and another domain (or computer) across the network. It also allows her to display the time for any system on the network. The syntax is
net time [\\computername | /domain[:domainname]] [/set]
When no parameters are given, the net time command will display the time from the time server system. The /set parameter is optional and required only when you want to change the time. If omitted, the time on the system named is displayed; if used, the time on the current system is synchronized with the time on the system named.
Table A.41. time Options | |
Option | Description |
hrs | Enters the hour in either regular or 24-hour format. Acceptable values are 0 through 23. |
min | Enters the minutes, ranging from 0 through 59. |
sec | Enters the seconds, ranging from 0 through 59. |
.hun | Enters the hundredths of a second, ranging from 0 through 99. |
AP | Enters A for A. M. or P for P. M. This field is not necessary if the 24-hour format is used. |
The \\computername or the /domain:domainname identifies the system for which to display the time or the system with which the current system's time is synchronized. The domainname portion of the /domain:domainname parameter is optional. (Chat is not available from within a Terminal Services session.)
Logging on as Another User
To log on as another user, you must first access the Windows Server 2003 Security window by pressing CTR+ALT+DEL. This window displays who you are currently logged on as, the name of the current domain, and the date and time of logon. Select the Logoff button to log off as this user.
Chat Mode
The Windows Server 2003 winchat application allows users to converse with each other. It is accessed by typing winchat from the command prompt. To initiate a conversation, select Conversation
Dial from the menu bar. In the Select Computer window that appears, either enter the name of the computer of the person you want to chat with or select one from the list.
When you receive a chat message, a Chat button will display on the taskbar. To respond to the message, click Chat and select Conversation
Answer.
While researching some problems with this utility, we discovered Microsoft's NetMeeting software, which enables communication over the Internet or an intranet. Windows Server 2003 has the Internet phone feature along with multi-user data conferencing, which allows application sharing, an electronic white board, a text-based chat facility, and binary file transfer.
NET NAME COMMAND
The net name command adds, deletes, or displays names that are authorized to receive messages. These names are used only for messaging and must be unique throughout the network. Windows Server 2003 acknowledges three types of names here: computer, user, and messaging. To execute the net name command, the Messenger service must be running. The syntax is
net name [name [/action]]
Executing the net name command without parameters will display a list of all names that can accept messages on this computer. The name parameter is the unique name authorized to receive messages and can be up to 15 characters. Acceptable values for the /action parameter are /add and /delete, which instructs the command to add or delete the messaging name entered. The /action parameter is optional, with /add as the default.
Table send Options for the destination Parameter | ||
Option | Qualifier | Description |
* | Sends the message to all names in the user's group. | |
/domain | :domainname | Sends the message to all names in either the current domain or the domain or workgroup given by the :domainname parameter. |
name | Enters the user name, the computer name, or the messaging name of the recipient of the message. Names that include space characters should be enclosed in quotes. | |
/users | Sends the message to all users connected to the server. |
NET NAME COMMAND EXAMPLE
To add the messaging name techsupport to the computer, enter one of the following commands:
|
Из за большого объема этот материал размещен на нескольких страницах:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |


