عدلت على طريقة الاخ حسام ووصلت للمطلوب
On Error GoTo MyErr
Dim strFilePath As String
Dim strFilePath2 As String
strFilePath = "d:\mahmoud\data work\backup"
strFilePath2 = "z:\Blocks_be.accdb"
Dim OldFile, DBwithEXT, DBwithoutEXT, NewFile, CopyMyDB
adad = strFilePath2
OldFile = adad
DBwithEXT = Dir(OldFile)
DBwithoutEXT = Left(DBwithEXT, Len(DBwithEXT) - 4)
If Len(Dir(strFilePath, vbDirectory)) = 0 Then
MkDir strFilePath
SetAttr strFilePath, vbNormal
End If
NewFile = strFilePath & "\Blocks_be-" & Format(Date, "yyyy-mm-dd") & "-" & Format(Now(), "Hh-Nn-ss-AMPM.") & Right(DBwithEXT, 5)
CopyMyDB = "cmd.exe /C copy " & """" & OldFile & """" & " " & """" & NewFile & """"
Shell CopyMyDB, 0
MyErr:
If Err.Number <> 0 Then
MsgBox Err.Number & " - " & Err.Description
End If
وشكرا جزيلا لكم على المساعدة الاكثر من رائعة