Copy codeThe Code is as follows: '/* =================================================== ==========================================
'* The Intro automatic backup folder is scheduled to a new directory named after time. After the folder is set, it is added to the startup Item. As long as the machine program is started, it runs automatically, which is not counted as the system resource.
'* FileName AutoBackUpFolder. VBS
'* Author yongfa365
'* Version v1.0
'* Email yongfa365 [at] qq.com
'* MadeTime 17:18:33
'* LastModify 17:18:33
'* ===================================================== ============================================= */
Do While 1
Run ()
'Wscript. Sleep 1000*60*60*2
WScript. Sleep 1000 * 5' for testing. The file is backed up every five seconds to the specified folder.
Loop
Function Run ()
BackUpFolder "D: \ all the systems being designed by the company", "E: \ Automatic Software backup"
End Function
Function BackUpFolder (S, D)
On Error Resume Next
Set FSO = CreateObject ("Scripting. FileSystemObject ")
FSO. CreateFolder D
FSO. CopyFolder S, D & "\" & GetDateFolder
End Function
Function GetDateFolder ()
GetDateFolder = Year (Now) & "-" & Right ("0" & Month (Now), 2) & "-" & Right ("0" & Day (Now ), 2) & "-" & Right ("0" & Hour (Now), 2) & "-" & Right ("0" & Minute (Now), 2) & "-" & Right ("0" & Second (Now), 2)
End Function