我在我的 VAPI-XP 脚本中使用以下代码在测试实验室中上传我的最新文件。但是附件没有上传。
Set fso = CreateObject("Scripting.FileSystemObject")
Set folder = fso.GetFolder("D:\Services\2017\Test\New folder")
Set recentFile = Nothing
For Each file in folder.Files
If UCase(fso.GetExtensionName(file.name)) = "XLS" Then
If (recentFile is Nothing) Then
Set recentFile = file
ElseIf (file.DateLastModified > recentFile.DateLastModified) Then
Set recentFile = file
End If
End If
Next
TDHelper.UploadAttachment "D:\Services\2017\Test\New folder" & "\" & recentFile.name, CurrentRun