'I can not seem to backup my Documents under windows 10 - Help
'Creates Today's Date and Computer Name
Dim ComputerName
Dim dtmvalue
Dim strDate
dtmValue = Now()
Set WshNetwork = WScript.CreateObject("WScript.Network")
Set FSO = CreateObject("Scripting.FileSystemObject")
ComputerName = WshNetwork.ComputerName
strDate = "E:\" & Month(dtmValue)& "-"&Day(dtmValue)&"-"&Year(dtmValue)&" "&(WshNetwork.ComputerName)
if FSO.FolderExists(strDate) Then
Else
FSO.CreateFolder(strDate)
End if
'Documents
Dim DocT
Dim Mfiles
Dim DocS
Dim MB
DocT = strDate&"\"&"Documents\"
if FSO.FolderExists (DocT) Then
Else
FSO.CreateFolder (DocT)
End If
Set oShell = CreateObject("WScript.Shell")
Set Mfiles = CreateObject("Scripting.FileSystemObject")
Set MB = CreateObject("Wscript.Shell")
strHomeFolder = oShell.ExpandEnvironmentStrings("%USERPROFILE%")
DocS = strHomeFolder&"\Documents\*.*"
Wscript.echo Mfiles.folderexists DocS
WScript.echo Mfiles.folderexists DocT
Mfiles.CopyFolder DocS, DocT, True
MB.Popup "Your Documents Folder has been Backup Succesfully", 5, "Documents Folder", 64+4096
'Creates Today's Date and Computer Name
Dim ComputerName
Dim dtmvalue
Dim strDate
dtmValue = Now()
Set WshNetwork = WScript.CreateObject("WScript.Network")
Set FSO = CreateObject("Scripting.FileSystemObject")
ComputerName = WshNetwork.ComputerName
strDate = "E:\" & Month(dtmValue)& "-"&Day(dtmValue)&"-"&Year(dtmValue)&" "&(WshNetwork.ComputerName)
if FSO.FolderExists(strDate) Then
Else
FSO.CreateFolder(strDate)
End if
'Documents
Dim DocT
Dim Mfiles
Dim DocS
Dim MB
DocT = strDate&"\"&"Documents\"
if FSO.FolderExists (DocT) Then
Else
FSO.CreateFolder (DocT)
End If
Set oShell = CreateObject("WScript.Shell")
Set Mfiles = CreateObject("Scripting.FileSystemObject")
Set MB = CreateObject("Wscript.Shell")
strHomeFolder = oShell.ExpandEnvironmentStrings("%USERPROFILE%")
DocS = strHomeFolder&"\Documents\*.*"
Wscript.echo Mfiles.folderexists DocS
WScript.echo Mfiles.folderexists DocT
Mfiles.CopyFolder DocS, DocT, True
MB.Popup "Your Documents Folder has been Backup Succesfully", 5, "Documents Folder", 64+4096