From 951dff84fab55424adce40747ddbfa870c431b5e Mon Sep 17 00:00:00 2001 From: Anton Vakhrushev Date: Mon, 21 Jul 2025 11:10:11 +0300 Subject: [PATCH] Preserve file extension --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 461e7eb..a6612e5 100644 --- a/main.go +++ b/main.go @@ -150,7 +150,7 @@ func processFile(filePath, destDir, counterPath string, counter *int) { *counter++ saveCounter(counterPath, *counter) - newName := fmt.Sprintf("%05d", *counter) + newName := fmt.Sprintf("%05d%s", *counter, filepath.Ext(filePath)) destPath := filepath.Join(destDir, newName) _, err := os.Stat(destPath)