public IsoFolderElement(TreeNode folderElement, bool isRoot, string childNumber) { Date = folderElement.CreationTime; LongName = folderElement.Name; // If you need to use the short name, then you may want to change the naming method. if (isRoot) { ShortName = "."; LongName = "."; } else { if (LongName.Length > 8) { ShortName = LongName.Substring(0, 8 - childNumber.Length).ToUpper().Replace(' ', '_').Replace('.', '_'); ShortName += childNumber; } else { ShortName = LongName.ToUpper().Replace(' ', '_').Replace('.', '_'); } } if (LongName.Length > IsoAlgorithm.FileNameMaxLength) { LongName = LongName.Substring(0, IsoAlgorithm.FileNameMaxLength - childNumber.Length) + childNumber; } }