By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,841 Members | 1,704 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,841 IT Pros & Developers. It's quick & easy.

Access VBA vs .BAT

P: 1
I need to copy and rename a file when my form first loads. Right now, I'm calling a .BAT that I've created in the folder where my files reside and it's working just fine. I would prefer to use VBA code to do the copying. The help is pointing to a method called copyfile but I can't figure out how to make it work. The file that I'm copying and renaming is an other .mdb. I'm using Access 2003 on Windows NT.
Oct 7 '06 #1
Share this Question
Share on Google+
1 Reply


PEB
Expert 100+
P: 1,418
PEB
Hi

Try with

Remarks

Wildcard characters can only be used in the last path component of the source argument. For example, you can use:

FileSystemObject.CopyFile "c:\mydocuments\letters\*.doc", "c:\tempfolder\"

But you can't use:

FileSystemObject.CopyFile "c:\mydocuments\*\R1???97.xls", "c:\tempfolder"
Oct 8 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.