نسخة الكود كما يلي:
TempSource ، tempend يجب أن يستخدم المسار المطلق
ROOTPATH = request.ServerVariables ("Appl_Physical_Path") "احصل على المسار المطلق للبرنامج الحالي
FunctionCopyFiles (TempSource ، Tempend)
Dimfso
setfso = server.createObject ("scripting.filesystemObject")
iffso.filexists (tempend) ثم
Response.write "ملف النسخ الاحتياطي الهدف <b>" & tempend & "</b> موجود بالفعل ، يرجى حذفه أولاً!"
setfso = لا شيء
exitfunction
Endif
iffso.filexists (tempsource) ثم
آخر
Response.write "ملف قاعدة بيانات المصدر المراد نسخه <b>" & tempsource & "</b> غير موجود!"
setfso = لا شيء
exitfunction
Endif
fso.copyfiletempsource ، tempend
Response.write "قام بنجاح بنسخ الملف <b>" & tempsource & "</b> إلى <b>" & tempend & "</b>"
setfso = لا شيء
الوظيفية