Change modified date after filename

I found the script:

File name to modified date/time?

Replace the button script with the following:

Rename PATTERN="*" TO="*"
@script vbscript
Option Explicit
' For information on the technique used in this button see:
' "Abusing" Rename Scripts to do other things with file info
' https://resource.dopus.com/t/abusing-rename-scripts-to-do-other-things-with-file-info/5969/1
' Change the path below if you haven't installed Opus to the default location:
dim DOpusRTPath
DOpusRTPath = "%ProgramFiles%\GPSoftware\Directory Opus\dopusrt.exe"
Dim Shell
Set Shell = CreateObject("WScript.Shell")
Dim re1, re2
Set re1 = new RegExp
Set re2 = new RegExp
Function Rename_GetNewName(strFileName, strFilePath, fIsFolder, strOldName, ByRef strNewName)
	Dim strYYYYMMDD
	Dim strCommand
	' Set strNewName to an empty string so that Opus does not rename the file.
	strNewName = ""
	re1.IgnoreCase = True
	re1.Global = False
	re2.IgnoreCase = True
	re2.Global = False
	' Test these date patterns: -dd-mm-yyyy or ddmmyyyy
	re1.Pattern = "^(?:.*?)(?:-(\d{2})-(\d{2})-(\d{4})|(\d{2})(\d{2})(\d{4}))(?:.*)$"
	' Test this date pattern: -yyyy-mm-dd
	re2.Pattern = "^(?:.*?)-(\d{4}-\d{2}-\d{2})(?:.*)$"
	
	If (re1.Test(strFileName)) Then
		' Set strYYYYMMDD to a string like "2011-07-29"
		strYYYYMMDD = re1.Replace(strFileName, "$3$2$1$6$5$4")
	ElseIf (re2.Test(strFileName)) Then
		' Set strYYYYMMDD to a string like "2011-07-29"
		strYYYYMMDD = re2.Replace(strFileName, "$1")
	End If
	If (Not IsEmpty(strYYYYMMDD)) Then
		'DOpus.OutputString "YYYYMMDD  = " & strYYYYMMDD
		strCommand = """" & DOpusRTPath & """ /cmd SetAttr FILE=""" & strFilePath & "\" & strFileName & """ MODIFIED=""" & strYYYYMMDD & """"
		'DOpus.OutputString "CMD = " & strCommand
		Shell.Run strCommand,0,true
	End If
End Function