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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top