SoFunction
Updated on 2025-04-11

Automatic folder backup


'/*=========================================================================
' * Intro timed automatically back up the folder to a new directory named after time, and after setting it, add it to the startup item. As soon as the machine program is started, it will run automatically, and the system resources can be ignored.
' * FileName
' * Author yongfa365
' * Version v1.0
' * Email yongfa365[at]
' * MadeTime 2009-05-14 17:18:33
' * LastModify 2009-05-14 17:18:33
' *==========================================================================*/
Do While 1
Run()
' 1000*60*60*2
1000 * 5 'For test, backup files every 5 seconds to the specified folder
Loop
Function Run()
BackUpFolder "D:\all systems being designed by the company", "E:\automatic software backup"
End Function
Function BackUpFolder(S, D)
On Error Resume Next
Set FSO = CreateObject("")
D
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