diff --git a/RombaSharp/RombaSharp.cs b/RombaSharp/RombaSharp.cs index 05e2e957..3183c53c 100644 --- a/RombaSharp/RombaSharp.cs +++ b/RombaSharp/RombaSharp.cs @@ -73,6 +73,7 @@ namespace SabreTools build = false, copy = false, dbstats = false, + depotRescan = false, diffdat = false, dir2dat = false, export = false, @@ -112,6 +113,9 @@ namespace SabreTools case "dbstats": dbstats = true; break; + case "depot-rescan": + depotRescan = true; + break; case "diffdat": diffdat = true; break; @@ -180,8 +184,8 @@ namespace SabreTools } // If more than one switch is enabled, show the help screen - if (!(archive ^ build ^ dbstats ^ diffdat ^ dir2dat ^ export ^ fixdat ^ lookup ^ memstats ^ - miss ^ progress ^ purgeBackup ^ purgeDelete ^ refreshDats ^ shutdown)) + if (!(archive ^ build ^ dbstats ^ depotRescan ^ diffdat ^ dir2dat ^ export ^ fixdat ^ lookup ^ + memstats ^ miss ^ progress ^ purgeBackup ^ purgeDelete ^ refreshDats ^ shutdown)) { _logger.Error("Only one feature switch is allowed at a time"); Build.Help(); @@ -190,7 +194,7 @@ namespace SabreTools } // If a switch that requires a filename is set and no file is, show the help screen - if (inputs.Count == 0 && (archive || build || dir2dat || fixdat || lookup || miss)) + if (inputs.Count == 0 && (archive || build || depotRescan || dir2dat || fixdat || lookup || miss)) { _logger.Error("This feature requires at least one input"); Build.Help(); @@ -218,6 +222,15 @@ namespace SabreTools DisplayDBStats(); } + // Rescan a specific depot + else if (depotRescan) + { + foreach (string input in inputs) + { + Rescan(input); + } + } + // Creates a DAT file with those entries that are in new DAT else if (diffdat) { diff --git a/SabreTools.Helper/Data/Build.cs b/SabreTools.Helper/Data/Build.cs index 3e6dc7e9..7526d36b 100644 --- a/SabreTools.Helper/Data/Build.cs +++ b/SabreTools.Helper/Data/Build.cs @@ -85,6 +85,7 @@ namespace SabreTools.Helper helptext.Add(" build For each specified DAT file it creates TZip files"); helptext.Add(" -copy Copy files instead of rebuilding"); helptext.Add(" dbstats Prints db stats"); + helptext.Add(" depot-rescan Rescan a specific depot to get new information"); helptext.Add(" diffdat Creates a DAT file for entries found in the new DAT"); helptext.Add(" -new= DAT to compare to"); helptext.Add(" dir2dat Creates a DAT file for the specified input directory");