private static void AddLocalDirectory(StartupInfo info, string[] args) { string path = args[0]; ArchiveOpenMode mode = File.Exists(path) ? ArchiveOpenMode.OPEN : ArchiveOpenMode.CREATE; Archiver a = new Archiver(path, mode); string target = args.Length > 2 ? args[2] : ""; a.AddFolder(Path.GetFullPath(args[1]), target); a.Dispose(true); }