Hi Hakan,
LegalCopyright is an array of strings. The needed value is stored in the first element of the LegalCopyright array (LegalCopyright(0)). The following script demonstrates how to verify copyright for a file:
Sub Main
Dim file, fileObj, Copyright
file = "<full name>"
Set fileObj = aqFileSystem.GetFileInfo(file)
Copyright = getCopyright(fileObj)
If Len(Copyright) > 0 Then
Log.Message ("Copyright for the file "+ file + " is " + Copyright)
Else
Log.Warning ("Copyright for the file "+ file + " is missing!")
End If
End Sub
Function getCopyright(fileObj)
Dim VerInfo
If fileObj.VersionInfo Is Nothing Then
Log.Warning "No version info in file."
getCopyright = ""
Exit Function
End If
Set VerInfo = fileObj.VersionInfo
If Len(VerInfo.LegalCopyright(0)) = 0 Then
Log.Warning "No legal copyright in version info field."
getCopyright = ""
Exit Function
End If
getCopyright = VerInfo.LegalCopyright(0)
End Function
I hope this helps.