Tuesday, December 14, 2010

【 Weak current College 】 DOS command in Visual FoxPro (3)



The format of the full name of the file is 1 + 2 + file the file's full name in full 3 + ... + n file name is specified by the n files combined into one file, put it into a destination file name in the specified directory, a new file name is the target file name is specified by the filename.

Copy command on the format. It also has many options, but for most users do not have, so they do not refer to it. Interested can use copy/?.

When using the copy command to a file or a batch file to copy into the other file, the original one or a group of files, will not be lost.

A directory in a file with the same name does not appear. But with the copy command to copy any type of format file is very likely to generate the target directory with the same file, this DOS? in this case, the copy command will tell you that a file with the same name, and give you several options: 1. the new copy from the file instead of the original file, 2. preserving the original file, new and existing file with the same name as the file is not copied over. 3. all of the same name as files are replaced with a new file. Detailed tips and corresponding actions as follows:

DOS prompt:

Overwrite the file with "(YesNoAll)?

You want to overwrite this file? you can type y, n, has a representative, choose Yes, No, All.

If you type a y, meaning "Yes, I want to use the new file to replace the old file". If you select n, meaning "no, I do not want to use the new file to replace the old file". That old files are kept, new files will not be copied over. Note the first two options are only for the purposes of the file with the same name, and file with the same name, it will again ask DOS. If you type a, meaning "Yes, I want to use the new file to replace the old file, then a file with the same name, I mean it." Then the next recurrence of the same name file, DOS won't prompt. Of course, this option is only for the purposes of a copy operation.

If youspecify the source file does not exist, then the DOS prompt:

Filenotfound--<文件名>

0file(s)copied

If you specify a source directory or in the target directory does not exist, the DOS prompt:

Invaliddirectory!

Five .Xcopy

This command is the file copy command. As with the copy of the syntax, it is best to use that it has an option "/s".

Think about the copy command, if we want to put all the c:ddd directory includes the files and subdirectories are copied to a different place, we need a directory to copy a directory, respectively. But if you use xcopy, simply command followed by a "/s", the command will put the source directory, all content, including all the source directory of the depth of the subdirectory structure all copied to the destination directory, the final result is the destination directory has the same source directory of the directory structure.

Six .Diskcopy

This command is the file copy command that is specifically designed to be a floppy on all content to replicate to a different floppy. So you have to prepare a source diskette, you are ready to copy the disk. And then also have a target disk, used to copy the contents of the source disk to it. Target plate can be a new disk, or it can be used up. A commonly used format for this command:

diskcopya:a:

The first prompt you to insert the source disk a drive. Follow the prompts to insert the source disk, press ENTER, the computer began to read the content on the source disk, read hints you will target disk into a drive. According to the prompt to press ENTER after the computer started to target disk write and read from the source disk to the content. Finish after the DOS prompt you finished, and ask you whether you want to write the contents of the source disc to another sheet of the target disk. If you answer y, then just follow the next tips to a drive, insert the additional target disk, the carriage return. So in a circle, a source diskette can assign many pieces of the destination disk. If you answer n, diskcopy execution ends. The result is your content on the destination disk and the source disk.

Seven .Move

The command syntax:

The full path to the file 1.Move

The format of the file name is specified by the file you copied to the destination path, and then delete the original file. Move and copy difference here, copy retains its original things move without reservations.

2.Move path 1 path 2

This format, path 1 is called the source path, path 2 called the target path. The command used to convert the source itself and all files inside and all the nesting depth of the contents of all subdirectories has been moved to the destination path and full replication source path directory structure. The so-called movement, that is the source path itself and the content inside the move completes after being deleted. Because the command does not retain the original things, so use caution when.

Eight .Find

This command is used to find one or more files have the string is not specified. Its syntax is:

Find quotes for string file name 1 file name 1 ... File name n

The command to specify n find a string in the file, find the file name will be listed. It has several options, one of which is the selected/IItems that find searches ignore letter case.

Nine .Ren

This is the file name and directory name of the command. The format is simple:

Ren old name new name

Of course, the new name cannot be the same directory as the existing name duplication.

10 .Format

This is used to format the disk. It's format:

Format letters

A new disk, a floppy disk or hard drive, just started to use when formatting the disk, the role is empty, use dos on disk can be recognized by redrawing of the sector, write to the operating system, etc.

This command has several options, one of which is/s,meaning that when formatting is complete, the operating system writes to the disk is commonly known as making boot disk.

To format a disc: to insert a floppy disk into drive a, note a disk write protection to close (write-protection will be explained below), and then enter the command formata: <回车>. If you want to make a boot disk to a floppy disk, and then enter the command:/s <回车> formata.

To format the c drive: usually c disk should be the startup disk, so you should enter the command:/s <回车> formata. Keep in mind that you do not understand what you do, don't go to format the c drive.

11 .Attrib

Existing files on disk and directory have property: suppressed, read-only, system, and so on. We talk about hidden and read-only. If a file is hidden, then using the above talk of dir's various formats are not listed in this file. If a file is read-only, so you will not be able to modify, and delete the file. On some very important files, we can leave it set to hidden and read-only property.

Tips: in the dir command followed by the options you can list the implied/ah property.

The order of use:

1.Attrib + r file name

The command to the file name is specified by the file with read-only property.

2.Attrib + h file name

The command to the file name is specified by the file plus the hidden attribute.

3.Attrib + r + h file name

The command to the file name is specified by the file plus the hidden and read-only property.

4.Attrib-r file name

The command to the file name is specified by the file on a read-only property.

5.Attrib-h file name

The full name of the command to the file specified by file attributes eliminate on implied.

6.Attrib-r-h file name

The command to the file name is specified by the file on a read-only property of suppressing and are eliminated.

No comments:

Post a Comment