From 5dbc03ff7f1b78e2918c6c76d459ff76d4a819e1 Mon Sep 17 00:00:00 2001 From: Sarahtonin Date: Mon, 6 Apr 2026 01:19:30 +0200 Subject: [PATCH] Fixed DirConf to change the LastFile value to the last file sorted in the folder. --- DirConfig.toml | 12 +++++++++--- SaraSortd.py | 3 ++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/DirConfig.toml b/DirConfig.toml index 929d90e..5a86105 100644 --- a/DirConfig.toml +++ b/DirConfig.toml @@ -1,11 +1,17 @@ Title = "Unset" +LastFile = "Unset" +ParentDir = "Unset" [[Files]] -Pattern = "*" +Pattern = "*.jpg" NewFileName = "~^" NextNum = 1 NextChar = "A" CaseSensitive = 0 -LastFile = "Unset" -ParentDir = "Unset" \ No newline at end of file +[[Files]] +Pattern = "*.png" +NewFileName = "~^" +NextNum = 1 +NextChar = "A" +CaseSensitive = 0 \ No newline at end of file diff --git a/SaraSortd.py b/SaraSortd.py index 355e458..7dc9118 100644 --- a/SaraSortd.py +++ b/SaraSortd.py @@ -282,7 +282,8 @@ def Sort(FilePath): try: Clone(FilePath, NewDirPath, NewName, True) - + UpdateConf(f"{NewDirPath}/{Parse(String = ConfNames["DirConfName"], Parent = os.path.basename(NewDirPath))}.toml", "LastFile", NewName) + TextOutput = Parse(String = ConfLog["Sorted"], VarCall = f"{FilePath} to {NewDirPath}/{NewName}") LogWrite(TextOutput) Speak(TextOutput)