Thread: Error using FTP
View Single Post
  #8  
Old 07-13-2006, 07:08 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,012
The include/exclude filters are treated as masks of files/folders to look for, so it's not considered an error if a value is specified and it doesn't match any files (each line could result in no, one, or multiple matches). You could add something like this to the step's vbld_StepDone script event (step properties -> Script Editor -> Edit -> Insert Event -> vbld_StepDone) if each line in the include list is a filename and you want it to fail if not all were copied:

Code:
	If Step.BuildStatus = vbldStepStatSucceeded Then
		' fail the step if didn't transfer every file listed in include list
		xfrCount = vbld_TempMacros()("FTP_TRANSFER_COUNT")
		listCount = UBound(Split(vbld_StepProp("Ext", vbString), vbCrLf))+1
		If xfrCount <> listCount Then
			Builder.LogMessage listCount & " files to transfer but only " & xfrCount & " transferred"
			Step.BuildStatus = vbldStepStatFailed
		End If
	End If
Reply With Quote