Rozwiązanie przysłał Kros (pracus@box43.gnet.pl):
Option Compare Database Option Explicit Const ProjectPath = "c:\projekty\" Public Function Podmiana() Dim S As String, Path As String S = CurrentDb.Name: Path = Left(S, Len(S) - Len(Dir(S))) If ProjectPath <> Path Then Open "c:\temp.bat" For Output As #1 Print #1, "copy """ & ProjectPath & Dir(S) & """ """ & S & """" Write #1, S Close #1 Shell "c:\temp.bat", vbMinimizedNoFocus DoCmd.Quit acQuitSaveNone End If End Function