public ReplicationFolder(Ship parentShip, string directoryFullPath, string relocationFolderName) { this.ParentShip = parentShip; FullPath = directoryFullPath; DirectoryName = Path.GetFileName(FullPath); RelocationFolder = relocationFolderName; RelocationFullPath = Path.GetDirectoryName(directoryFullPath) + "\\" + relocationFolderName + "\\" + DirectoryName + "\\"; if (!Directory.Exists(RelocationFullPath)) { Directory.CreateDirectory(RelocationFullPath); } if (directoryFullPath.Length == 26) { ReplicationMode = DirectoryName.Substring(0, 5); ReplicationYYMM = DirectoryName.Substring(5, 4); ReplicationId = Convert.ToInt32(DirectoryName.Substring(9, 3)); ReplicationReference = ReplicationMode + ReplicationYYMM + ReplicationId.ToString("D3"); ReplicationAckIMO = Convert.ToInt32(DirectoryName.Substring(12, 7)); ReplicationYYMMDD = DirectoryName.Substring(19, 6); } IsDefaultLocationForDeletion = false; IsRelocated = false; IsForShipReplication = false; SharePointListName = string.Empty; IsForAcknowledgement = false; ErrorMessage = string.Empty; }