View Single Post
  #1  
Old 04-29-2015, 01:56 PM
deramor deramor is online now
Registered User
 
Join Date: 05-11-2011
Posts: 27
Copy Files action sometimes results in corrupt file

Hello-

I am using VBP 8.7. I have recently run into problems with build output files getting copied to a network share. The issue manifests itself in VBP as a failure to copy a file with the error "Access Denied". The build was trying to copy a file to a place where the previous build was. Each build overwrites the previous output.

In the past, I noticed there is some level of retry logic if a file can not be accessed that the Copy Files step employs. According to my help desk people, the issue was that the file about to be replaced was open by a user. Normally I would expect the copy command to enter its retry logic and eventually fail.

Instead what happened was the copy command proceeded and later failed. This left the file in a corrupt state and I couldn't delete or rename it. Its user rights were just gone.

My question is, how does VBP copy files? Is is the VB script:
' Copies a file
Sub vbld_CopyFile(SourceFile, DestFile, Overwrite)
' ensure that the target file is not read-only
If OverWrite Then vbld_MakeFileWriteable DestFile
' copy
vbld_FSO.GetFile(SourceFile).Copy DestFile, Overwrite
End Sub

What triggers the retry logic?

Do you have an suggestions as to server settings that can help eliminate this issue?
Reply With Quote