Sideway BICK BlogSideway BICK BLOG from Sideway

A Sideway to Sideway Home

Link:http://output.to/sideway/default.asp?qno=110700140

CHKSTATE.SYS

MS DOS Command: CHKSTATE.SYS

Reference from Microsoft MS-DOS cmd help

Description

Used by the MemMaker memory-optimization program to track the optimization process.

During optimization, MemMaker adds the CHKSTATE.SYS command line to the beginning of your CONFIG.SYS file. When the optimization process is complete, MemMaker removes the CHKSTATE.SYS command line.

CHKSTATE.SYS is used exclusively by MemMaker.

Link:http://output.to/sideway/default.asp?qno=110700146

COUNTRY.SYS

MS DOS Command: COUNTRY

Reference from Microsoft MS-DOS cmd help

Description

Enables MS-DOS to use country-specific conventions for displaying times, dates, and currency; for determining the order by which characters are sorted; and for determing which characters can be used in filenames. You can use this command only in your CONFIG.SYS file.

The COUNTRY command configures MS-DOS to recognize the character set and punctuation conventions observed when using one of the supported languages.

Syntax

COUNTRY=xxx[,[yyy][,[drive:][path]filename]]

Parameters

xxx Specifies the country code.
yyy Specifies the character set for the country.
[drive:][path]filename Specifies the location and name of the file containing country information.

Related Commands

For information about changing characters and their arrangement on your keyboard, see the KEYB command, or see the chapter "Customizing for International Use" in the MS-DOS User's Guide.

For information about preparing and selecting character sets, see the MODE (set device code pages) command.

For information about loading country-specific information, see the NLSFUNC command.

Remarks

Changing default settings

MS-DOS uses the United States as the default setting. You can use the COUNTRY command in your CONFIG.SYS file to change the setting.

If you do not specify the location and name of the file containing country-specific information, MS-DOS tries to find the COUNTRY.SYS file in the root directory of your startup drive.

Specifying supported languages

The following table lists each country or language supported by MS-DOS. The table also lists the character sets you can use with each country code. For example, if you use country code 003, you can use only character set 437 or 850 for the yyy parameter. The first of the two character sets listed for each country or language is its default character set.

Country or language Country code Character sets
Belgium 032 850, 437
Brazil 055 850, 437
Canadian-French 002 863, 850
Croatia 038 852, 850
Czech Republic 042 852, 850
Denmark 045 850, 865
Finland 358 850, 437
France 033 850, 437
Germany 049 850, 437
Hungary 036 852, 850
International English 061 437, 850
Italy 039 850, 437
Latin America 003 850, 437
Netherlands 031 850, 437
Norway 047 850, 865
Poland 048 852, 850
Portugal 351 850, 860
Serbia/Yugoslavia 038 852, 850
Slovakia 042 852, 850
Slovenia 038 852, 850
Spain 034 850, 437
Sweden 046 437, 850
Switzerland 041 850, 437
United Kingdom 044 437, 850
United States 001 437, 850

Character sets for the following countries or languages are also available with special versions of MS-DOS: Arabic, Israel, Japan, Korea, People's Republic of China, and Taiwan.

Specifying international time and date formats

The country code specifies the time and date formats used by the following MS-DOS commands: BACKUP, DATE, RESTORE, and TIME.

The following table lists the date and time formats related to each country code. For each country code, the "Date format" column shows how MS-DOS displays January 3, 1993, and the "Time format" column shows how MS-DOS displays 5:35 P.M. (with 0 seconds and 0 hundredths of a second).

Country or language Country code Date format Time format
Belgium 032 23/01/1993 17:35:00
Brazil 055 23/01/1993 17:35:00
Canadian-French 002 1993-01-23 17:35:00
Czechoslovakia 042 1993-01-23 17:35:00
Denmark 045 23-01-1993 17.35.00
Finland 358 23.01.1993 17.35.00
France 033 23.01.1993 17:35:00
Germany 049 23.01.1993 17:35:00
Hungary 036 1993-01-23 17:35:00
International English 061 23-01-1993 5:35:00.00p
Italy 039 23/01/1993 17.35.00
Latin America 003 23/01/1993 5:35:00.00p
Netherlands 031 23-01-1993 17:35:00
Norway 047 23.01.1993 17:35:00
Poland 048 1993-01-23 17:35:00
Portugal 351 23-01-1993 17:35:00
Spain 034 23/01/1993 17:35:00
Sweden 046 1993-01-23 17.35.00
Switzerland 041 23.01.1993 17,35,00
United Kingdom 044 23/01/1993 17:35:00.00
United States 001 01-23-1993 5:35:00.00p
Yugoslavia 038 1993-01-23 17:35:00

Character sets for the following countries or languages are also available with special versions of MS-DOS: Arabic, Israel, Japan, Korea, People's Republic of China, and Taiwan.

Examples

To convert international currency, time, date, and case to French conventions, add the following command to your CONFIG.SYS file:

country=033

For this example, assume that the COUNTRY.SYS file is in the root directory of the startup drive. If COUNTRY.SYS is in a different location, you would specify the location in [drive:]path on the command line.

To specify a character set with the country code for France, type the following:

country=033,850

If you omit the character set but include the [drive:][path] filename parameter, you must still type the comma that would have preceded the character set, as the following example shows:

country=033,,c:\dos\country.sys

Link:http://output.to/sideway/default.asp?qno=110700145

COPY

MS DOS Command: COPY

Reference from Microsoft MS-DOS cmd help

Description

Copies one or more files to the location you specify.

This command can also be used to combine files. When more than one file is copied, MS-DOS displays each filename as the file is copied.

Syntax

COPY [/Y|/-Y] [/A|/B] source [/A|/B] [+ source [/A|/B] [+ ...]][destination [/A|/B]] [/V]

Parameters

source Specifies the location and name of a file or set of files from which you want to copy. Source can consist of a drive letter and colon, a directory name, a filename, or a combination.
destination Specifies the location and name of a file or set of files to which you want to copy. Destination can consist of a drive letter and colon, a directory name, a filename, or a combination.

Switches

/Y Indicates that you want COPY to replace existing file(s) without prompting you for confirmation. By default, if you specify an existing file as the destination file, COPY will ask you if you want to overwrite the existing file. (Previous versions of MS-DOS would simply replace the existing file.) If the COPY command is part of a batch file, COPY will behave as in previous versions. Specifying this switch overrides all defaults and the current setting of the COPYCMD environment variable.
/-Y Indicates that you want COPY to prompt you for confirmation when replacing an existing file. Specifying this switch overrides all defaults and the current setting of the COPYCMD environment variable.
/A

Indicates an ASCII text file. When the /A switch precedes the list of filenames on the command line, it applies to all files whose names follow the /A switch, until COPY encounters a /B switch, in which case the /B switch applies to the file whose name precedes the /B switch.

When the /A switch follows a filename, it applies to the file whose name precedes the /A switch and to all files whose names follow the /A switch, until COPY encounters a /B switch, in which case the /B switch applies to the file whose name precedes the /B switch.

An ASCII text file can use an end-of-file character (CTRL+Z) to indicate the end of the file. When combining files, COPY treats files as ASCII text files by default.

/B

Indicates a binary file. When the /B switch precedes the list of filenames on the command line, it applies to all files whose names follow the /B switch, until COPY encounters an /A switch, in which case the /A switch applies to the file whose name precedes the /A switch.

When the /B switch follows a filename, it applies to the file whose name precedes the /B switch and to all files whose names follow the /B switch, until COPY encounters an /A switch, in which case the /A switch applies to the file whose name precedes the /A switch.

The /B switch specifies that the command interpreter is to read the number of bytes specified by the file size in the directory. The /B switch is the default value for COPY unless COPY is combining files.

/V Verifies that new files are written correctly.

Related Command

For information about copying directories and subdirectories, see the XCOPY command.

Remarks

Setting the COPYCMD environment variable

You can set the COPYCMD environment variable to specify whether you want the COPY, MOVE, and XCOPY commands to prompt you for confirmation before overwriting a file, whether issued from the command prompt or a batch file.

To force the COPY, MOVE, and XCOPY commands to prompt you before overwriting in all cases, set the COPYCMD environment variable /-Y. To force these commands to overwrite in all cases without prompting you, set the COPYCMD environment variable to /Y.

Typing any of these commands with the /Y or /-Y switch overrides all defaults and the current setting of the COPYCMD environment variable.

Copying to and from devices

You can substitute a device name for one or more occurrences of source or for destination.

Using or omitting the /B switch when copying to a device

When destination is a device (for example, COM1 or LPT1), the /B switch causes MS-DOS to copy data to the device in binary mode. In binary mode, all characters (including such special characters as CTRL+C, CTRL+S, CTRL+Z, and carriage return) are copied to the device as data. Whereas, omission of the /B switch causes MS-DOS to copy data to the device in ASCII mode. In ASCII mode, such special characters as those previously listed may cause MS-DOS to take special action during the copying process.

Using the default destination file

If you do not specify a destination file, MS-DOS creates a copy with the same name, creation date, and creation time as the original file, placing the new copy in the current directory on the current drive. If the source file is on the current drive and in the current directory and you do not specify a different drive or directory for the destination file, the COPY command stops and MS-DOS displays the following error message:

File cannot be copied onto itself 0 File(s) copied

Using the /V switch

If MS-DOS cannot verify a write operation, it displays an error message. Although recording errors rarely occur with the COPY command, the /V switch lets you verify that critical data has been correctly recorded. The /V switch also slows down the COPY command, because MS-DOS must check each sector recorded on the disk.

Using the /A and /B switches

The effect of an /A or /B switch depends upon its position on the command line. When the /A or /B switch follows the source filename, COPY performs as shown in the following list:

/A   Treats the file as an ASCII (text) file and copies data that precedes the first end-of-file character. COPY does not copy the first end-of-file character or the remainder of the file.

/B   Copies the entire file, including any end-of-file character.

When the /A or /B switch follows the destination filename, COPY performs as shown in the following list:

/A   Adds an end-of-file character as the last character of the file.

/B   Does not add an end-of-file character.

Combining files with the COPY command

If you specify more than one source, separating entries with a plus sign (+), COPY combines the files, creating a single file. If you use wildcards in source but specify a single filename in destination, COPY combines all files matching the filename in source and creates a single file with the filename specified in destination.

In either case, COPY assumes the combined files are ASCII files unless you specify the /B switch. (Do not combine non-ASCII files without specifying the /B switch; doing so can result in truncated files, since most binary files contain CTRL+Z characters which cause COPY to behave as if it has reached the end of the file.)

If the name of the destination file is the same as the name of one of the files being copied (except the first file), the original contents of the destination file are lost. When this happens, COPY displays the following message:

Content of destination lost before copy

Copying files in subdirectories

To copy all of a directory's files and subdirectories, you should use the XCOPY command.

Copying zero-length files

COPY does not copy files that are 0 bytes long; instead, it deletes such files. Use XCOPY to copy these files.

Changing the time and date of a file

If you want to assign the current time and date to a file without modifying the file, use a command in the following format. The commas indicate the omission of the destination parameter.

copy /b source+,,

Examples

The following command copies a file and ensures that an end-of-file character is at the end of the copied file:

copy memo.doc letter.doc /a

To copy the NOTE.TXT file from the current drive and directory to the directory MYNOTES, and to prevent MS-DOS from prompting you before overwriting the destination file (if it already exists), type the following command:

copy note.txt mynotes /y

To copy a file named ROBIN.TYP from the current drive and directory to an existing directory named BIRDS that is located on drive C, type the following command:

copy robin.typ c:\birds

If the BIRDS directory doesn't exist, MS-DOS copies the file ROBIN.TYP into a file named BIRDS that is located in the root directory on the disk in drive C.

To copy several files into one file, list any number of files as source parameters on the COPY command line. Separate filenames with a plus sign (+) and specify a filename for the resulting combined file, as the following example shows:

copy mar89.rpt + apr89.rpt + may89.rpt report

This command combines the files named MAR89.RPT, APR89.RPT, and MAY89.RPT from the current drive and directory and places them in a file named REPORT in the current directory on the current drive. When files are combined, the destination file is created with the current date and time. If you omit destination, MS-DOS combines the files and stores them under the name of the first specified file. For example, if a file named REPORT already exists, you can use the following command to combine all four files in REPORT:

copy report + mar89.rpt + apr89.rpt + may89.rpt

You can also combine several files into one by using wildcards, as the following example shows:

copy *.txt combin.doc

This command combines all files in the current directory on the current drive that have the extension .TXT into one file named COMBIN.DOC, also in the current directory on the current drive.

If you want to combine several binary files into one by using wildcards, include the /B switch, as the following example shows:

copy /b *.exe combin.exe

This prevents MS-DOS from treating CTRL+Z as an end-of-file character.

CAUTION: If you combine binary files, the resulting file might not be usable due to internal formatting.

In the following example, COPY combines each file that has a .TXT extension with its corresponding .REF file. The result is a file with the same filename but with a .DOC extension. Thus, COPY combines FILE1.TXT with FILE1.REF to form FILE1.DOC. Then COPY combines FILE2.TXT with FILE2.REF to form FILE2.DOC, and so on.

copy *.txt + *.ref *.doc

The following COPY command combines first all files with the .TXT extension, then all files with the .REF extension into one file named COMBIN.DOC:

copy *.txt + *.ref combin.doc

Copying information from the keyboard

The following COPY command copies what you type at the keyboard to the OUTPUT.TXT file:

copy con output.txt

After you type this command and press ENTER, MS-DOS copies everything you type to the file OUTPUT.TXT. When you are finished typing, press CTRL+Z to indicate that you want to end the file. The CTRL+Z character will appear on the screen as "Z". You can also end a COPY CON command by pressing the F6 key. When you press F6, it generates the CTRL+Z character, which appears on the screen as Z.

The following example copies information from the keyboard to the printer connected to LPT1:

copy con lpt1

Previous Month  JUL  2011  Next Month
SMTWTFS
12
3456789
10111213141516
17181920212223
24252627282930
31

Previous Month  JUL  2014  Next Month
SMTWTFS
12345
6789101112
13141516171819
20212223242526
2728293031

Sideway BICK Blog

22/07


Copyright © 2000-2020 Sideway . All rights reserved Disclaimerslast modified on 26 January 2013