01-05-18, 05:37 PM
02-05-18, 11:39 AM
Try
If Dir("D:\eer\backup", vbDirectory) = "" Then MkDir("D:\eer\backup")
sql = tf.Text + "\\ " + DateTime.Now.ToString("yyyy_MM_dd", New System.Globalization.CultureInfo("en-US")) + "___" + DateTime.Now.ToString("hh__mm__ss tt")
File.Copy(data, sql + ".bak")
MessageBox.Show("تم حفظ النسخة الاحتياطية بنجاح", "تم", MessageBoxButtons.OK, MessageBoxIcon.Information)
Catch ex As Exception
con.Close()
MessageBox.Show(ex.Message)
End Try
********************************************
If File.Exists(data) Then
File.Delete(data)
End If
File.Copy(T2.Text, data)
MessageBox.Show("تم إستعادة النسخة الاحتياطية بنجاح", "تم", MessageBoxButtons.OK, MessageBoxIcon.Information)
T2.Text = ""
If Dir("D:\eer\backup", vbDirectory) = "" Then MkDir("D:\eer\backup")
sql = tf.Text + "\\ " + DateTime.Now.ToString("yyyy_MM_dd", New System.Globalization.CultureInfo("en-US")) + "___" + DateTime.Now.ToString("hh__mm__ss tt")
File.Copy(data, sql + ".bak")
MessageBox.Show("تم حفظ النسخة الاحتياطية بنجاح", "تم", MessageBoxButtons.OK, MessageBoxIcon.Information)
Catch ex As Exception
con.Close()
MessageBox.Show(ex.Message)
End Try
********************************************
If File.Exists(data) Then
File.Delete(data)
End If
File.Copy(T2.Text, data)
MessageBox.Show("تم إستعادة النسخة الاحتياطية بنجاح", "تم", MessageBoxButtons.OK, MessageBoxIcon.Information)
T2.Text = ""