Do you try to know if the file is completed to write by ReadOnly attribute? Unfortunately, ReadOnly attribute is one of file system attributes and it doesn’t reflect file is being written or not.
So it’s necessary to use other approach. For example, get the file size at intervals of a few seconds, and if there is no change, determine that the write operation is complete.
In the “Invoke Code” activity, you can use the following VB.NET code to check if the Gzipped file is read-only:
Imports System.IO
Dim gzFilePath As String = “path_to_your_gz_file.gz”
Dim fileInfo As New FileInfo(gzFilePath)
If fileInfo.IsReadOnly Then
’ File is read-only
Throw New Exception(“The Gzipped file is read-only.”)
Else
’ File is not read-only
’ You can continue with your process
End If
Replace "path_to_your_gz_file.gz" with the actual file path of your Gzipped file.