From 58f3d5b92038d18b6f139bce0208fe5d60f6c0b2 Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Sat, 9 Nov 2024 21:25:53 +0800 Subject: [PATCH] Delete scripts directory --- scripts/rename-to-lowercase.js | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 scripts/rename-to-lowercase.js diff --git a/scripts/rename-to-lowercase.js b/scripts/rename-to-lowercase.js deleted file mode 100644 index 4dc932ee0..000000000 --- a/scripts/rename-to-lowercase.js +++ /dev/null @@ -1,32 +0,0 @@ -const fs = require("fs"); -const path = require("path"); - -const directoryPath = path.join(__dirname, "../domains"); - -function renameFilesToLowercase() { - // Read the files in the 'domains' directory - fs.readdir(directoryPath, (err, files) => { - if (err) { - console.error("Error reading directory:", err); - return; - } - - files.forEach((file) => { - const oldPath = path.join(directoryPath, file); - const newPath = path.join(directoryPath, file.toLowerCase()); - - // Only rename if the file name is not already in lowercase - if (oldPath !== newPath) { - fs.rename(oldPath, newPath, (err) => { - if (err) { - console.error("Error renaming file:", err); - } else { - console.log(`Renamed: ${file} -> ${file.toLowerCase()}`); - } - }); - } - }); - }); -} - -renameFilesToLowercase();