This call edits file and subdirectory names indirectly by transforming one ASCII string into another, using global file name characters for editing or search operations on the string.
DosEditName
EditLevel (USHORT) - input
DosEditName is used to search for and edit names of files and subdirectories. This call is typically used in conjunction with calls like DosMove and DosCopy, which do not permit the use of global file name characters, to perform repetitive operations on files.
As an example of an editing operation, a SourceString of "foo.bar" specified with an EditString of "*.baz" results in "FOO.BAZ" being returned. In the editing process, the string is changed to uppercase.
Global file name characters have two sets of semantics; one for searching and one for editing. If they are specified in SourceString, they are interpreted as search characters. If they are specified in EditString, they are interpreted as editing characters.
Use of the OS/2 COPY utility illustrates this difference in semantics. For example, if a user enters:
copy *.old *.newIn the source, the "*" acts as a search character and determines which files to return to the user. In the target, the "*" functions as an editing character by constructing new names for the matched files.
When used as search characters in SourceString, global file name characters simply match files and behave like any other search characters. They have the following meanings:
Searching is case-insensitive.
Any file name that does not have a period (.) in it gets an implicit one automatically appended to the end during searching operations. For example, searching for "foo." would return "foo".
When used as editing characters in EditString, global file name characters have the following meanings:
source string: "file.txt" editing string: "*E.TMP" destination string: "filE.TMP" copy file.txt *E.tmp -> filE.tmp