Wednesday, December 29, 2010

【 Weak current College 】 DOS command in Visual FoxPro (4)---Power By 【 China power house network 】




12 .Del

This command is used to delete files. Format:

Del file name

The command to the file name is specified by one or delete all files in a batch. When the file name is *. *, which means to remove the specified path for all files, then Dos will let you confirm whether you really want to delete all the files. If you really want to delete, enter y to enter.

This command does not delete the directory.

This is a dangerous command, be sure to consider before you use it. Example:

1.delmyfile.*

This format is to delete the current directory name is myfile, any file name extension.

2.Delaaa*.exe

This command deletes the current disk's root directory in a subdirectory of the aaa's extensions for all files in the exe.

3.Delaaa*.*

This command deletes the current directory in a subdirectory of the aaa in the file.

4.Del*.*

This command deletes the current directory for all files.

MD-build subdirectory

1. function: create a new subdirectory

2. type: internal commands

3. format: MD [drive:] [path name] page〈 subdirectory name >

4. instructions for use:

(1) the "letter": specify to create a subdirectory of the disk drive letters, if omitted, the current drive;

(2) the "pathname": to create a subdirectory of the parent directory, if the default is built in the current directory.

Case study: (1) in the root directory of drive c to create a subdirectory named FOX; (2) in the subdirectory and then create a FOX USER subdirectories.

C:, > MDFOX (on the current drive c: create subdirectories under FOX)

C:, > MDFOX, USER (in the subdirectory and then create a FOX USER subdirectories)

(2) CD — change the current directory

1. function: displays the current directory

2. type: internal commands

3. format: CD [drive:] [path] [subdirectory name]

4. instructions for use:

(1) If youomit the path, and the subdirectory name displays the current directory;

(2) such as "CD," formatting, you return to the root directory;

(3) if the use of "CD. " Format is returned to the top level directory.

Case study: (1) access to USER subdirectories; (2) to return from a subdirectory to the subdirectory USER; (3) back to the root directory.

C:, > CDFOX, USER (enter FOX USER subdirectories under a subdirectories)

C:、FOX、USER>CD.。 (Back up one level in the root directory)

C:, FOX > CD, (return to the root directory)

C:、>

(3) of the RD-delete subdirectories command

1. function: remove from the specified disk directory.

2. type: internal commands

3. format: RD [drive:] [path] [subdirectory name]

4. instructions for use:

(1) before deleting the subdirectories must be empty, which means that you need to enter the subdirectories, use the DEL (delete file command) to its subdirectory files by deleting the blank, and then return to top level directory, delete the RD command with the directory itself;

(2) you cannot remove the root directory and the current directory.

Example: requires the C disk FOX USER subdirectories under a subdirectories, operates as follows:

Step 1: first USER subdirectory files by deleting empty;

C、>DELC:、FOX、USER、*。 *

The second step, the deleted USER subdirectories.

C、>RDC:、FOX、USER

(4) DIR — displays disk directory command

1. function: displays the contents of the disk directory.

2. type: internal commands

3. format: DIR [drive] [path]

[/W]

4. instructions for use:/P; when you wish to view the directory too much, can not be finished in a screen display screen will roll up straight, not easy to see, together with the/P parameter, the screen will face a display 23 rows of file information, and then pause and tips; Pressanykeytocontinue

Use:/W added/W displays only thefile name, file size and creation date and time you are omitted. Plus parameters, each row can be displayed five file name.

PATH — the path to the Setup command

1. function: device search path for executable files, only the file is valid.

2. type: internal commands

3. format: PATH [letter 1] directory [path name 1] {[; letter 2:], page〈 directory pathname 2 > ...}

4. instructions for use:

(1) when you run an executable file, DOS will first search the current directory to the file, if found; if the running of the file is not found, according to the PATH order, order a set path to the directory one by one to search for the file;

(2) the path in the PATH command, if there are two or more, all paths to a semicolon-separated by ";";

(3) PATH command has three methods:

PATH [letter 1:] [path1] [letter 2:] [path 2] ... (Sets the search path for executable files)

PATH: (cancel all paths)

PATH: (displays the path of the currently set)

No comments:

Post a Comment