DosEditName is used to search for and edit names of files and subdirectories. Typically, it is used in conjunction with such functions as DosMove and DosCopy, which do not permit the use of global file-name characters, to perform repetitive operations on files.
An example of an editing operation is: pszSource = "foo.bar"; pszEdit = "*.baz"; result = "FOO.BAZ." In the editing process, the string is changed to uppercase.
Global file-name characters have two uses: searching and editing. If they are specified in pszSource, they are interpreted as search characters; in pszEdit, they are interpreted as editing characters. This difference can be illustrated with an example using the COPY utility. The user types the following:
copy *.old *.newIn the source, "*" acts as a search character and determines which files to return to the user. In the target, "*" functions as an editing character by constructing new names for the matched files.
When used as search characters in pszSource, global file-name characters simply match files and behave like any other search characters. They have the following meanings:
Any character other than * and ? matches itself, including ".".
Searching is not case-sensitive.
If a file name does not have a period (.), an implicit one is automatically appended to the end during searching operations. For example, searching for "foo." would return "foo".
When used in pszEdit, global file-name characters have the following meanings:
Editing is case-insensitive and case-preserving. If conflicts arise between the case of the source and that of the editing string, the case of the editing string is used, for example:
source string: "file.txt" editing string: "*E.TMP" destination string: "filE.TMP" copy file.txt *E.tmp -> filE.tmp