From be932a8828a5351f2a02396285bb67defdf4c4d8 Mon Sep 17 00:00:00 2001 From: Mike Phares Date: Sun, 5 Feb 2023 11:59:45 -0700 Subject: [PATCH] Rename id before confirm --- Rename/Rename.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Rename/Rename.cs b/Rename/Rename.cs index aae3639..2993c0f 100644 --- a/Rename/Rename.cs +++ b/Rename/Rename.cs @@ -348,7 +348,6 @@ public class Rename { results.Add(fileHolder.NameWithoutExtension); File.Move(fileHolder.FullName, to); - File.WriteAllText($"{to}.id", $"{to}{Environment.NewLine}{fileHolder.FullName}"); } log.Information("Done Moving"); } @@ -395,6 +394,8 @@ public class Rename if (File.Exists(to)) continue; verifiedToDoCollection.Add(new(fileHolder, to)); + if (string.IsNullOrEmpty(_AppSettings.CopyTo)) + File.WriteAllText($"{to}.id", $"{to}{Environment.NewLine}{fileHolder.FullName}"); } if (!verifiedToDoCollection.Any()) continue;