I have a process that I need to automate.
I get two new files weekly that come in named xxxTemp.
I delete the old xxx table and need to rename the xxxTemp to xxx.
I thought there was a COPYOBJECT that I could use with a macro.
Kill FileNameIncPath >> Will delete a local file
eg.
BackEnd = CurrentProject.Path & "\Database_BE.mdb"
Kill BackEnd
FileCopy NewFileNameIncPath, LocalFileNameIncPath >> will copy a file to a specified location
eg.
serverpath = "P:\Backup\Database.mdb"
servercopy = CurrentProject.Path & "\Database.mdb"
FileCopy servercopy, serverpath
Name FileNameIncPath As NewfileName >> will rename an existing file name
eg.
BackEnd = CurrentProject.Path & "\Database.mdb"
Name BackEnd As BackEnd & ".bak"
HTH << MaZeWorX >> Remember amateurs built the ark - professionals built the Titanic [flush]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.