Copying Files Using Wildcards for the Extension

D

dch3

Is it possible to use a statement such as

[object].CopyFile "C:\templateInformation.*", "C:\(copy)
templateInformation.*"

where multiple file names exist with the name 'templateInformation' but with
different file extension as in templateInformation.txt,
templateInformation.flds, templateInformation.atch?

I'm able to execute [object].DeleteFile "C:\templateInformation.*" without
any problems, but Copy File doesn't seem to like the wildcard.
 
D

dch3

The line
objFSO.CopyFile strTargetFile, strNewFile

keeps generating the error message "Invalid procedure call or arguement"

I've got a msgbox right above this line which confirms that the full path &
file name of strTargetFile and strNewFile are correct and have [.*] as the
trailing characters.
 
Top