From 699c17094294694ba7c0f00d11af5102761302ea Mon Sep 17 00:00:00 2001 From: DevGeniusCode <136935333+DevGeniusCode@users.noreply.github.com> Date: Fri, 14 Mar 2025 12:38:02 +0200 Subject: [PATCH 1/2] Init AssetCull --- SourceCode/Tools/CNCTools/assetcull.md | 48 ++++++++++++++++++++++++++ SourceCode/_Navbar.md | 1 + 2 files changed, 49 insertions(+) create mode 100644 SourceCode/Tools/CNCTools/assetcull.md diff --git a/SourceCode/Tools/CNCTools/assetcull.md b/SourceCode/Tools/CNCTools/assetcull.md new file mode 100644 index 00000000..cfb02db3 --- /dev/null +++ b/SourceCode/Tools/CNCTools/assetcull.md @@ -0,0 +1,48 @@ +# Duplicate File Removal Tool - **AssetCull** + +## **What is it?** + +The **AssetCull** tool is a program that removes duplicate files from a source directory by comparing two directories. +If an identical file is found in both directories, it is deleted from the source directory, and a batch file (Batch +file) is generated containing the deletion commands, allowing you to easily remove the duplicate files later. + +This tool is part of a suite of utilities that come with the source code for **C&C Generals & Zero Hour**. + +--- + +## Usage Instructions + +> [!WARNING] +> The **AssetCull** tool will **immediately delete duplicate files** from the source directory **during its execution**. +> The batch file that is created contains **deletion commands** that mirror the files already deleted by the tool. +> Therefore, **there is no need to run the batch file to delete the files again**, as the files are already removed from +> the source directory. +> Use the generated batch file only if you want to replicate the deletions or run the process again in the future. + +1. **Running the program**: + - Open the Command Prompt or Terminal. + - Use the following command, replacing the directories and batch file name as needed: + + ```bash + assetcull + ``` + + For example, if your source directory is `C:\Assets\dir1`, the target directory is `C:\Assets\dir2`, and you want to + store the deletion commands in `remove_duplicates.bat`, you would run: + + ```bash + assetcull C:\Assets\dir1 C:\Assets\dir2 remove_duplicates.bat + ``` + +2. **Result**: + - The program will scan the directories, find duplicate files, and delete them from the source directory. + - The `remove_duplicates.bat` file will document all deleted files and include deletion commands that you can use if + you want to run the deletions again in the future. + +3. **Review the Batch File**: + - Open the generated Batch file (`remove_duplicates.bat`) and verify that it contains the correct deletion commands + for the files. + +4. **Running the Batch File**: + - If you wish to delete the duplicate files, you can run the Batch file (`remove_duplicates.bat`), which will + contain all the necessary commands to delete the files. diff --git a/SourceCode/_Navbar.md b/SourceCode/_Navbar.md index c6bb9ddf..eeb62b29 100644 --- a/SourceCode/_Navbar.md +++ b/SourceCode/_Navbar.md @@ -33,6 +33,7 @@ ## Tools +- [AssetCull](Tools/CNCTools/assetcull.md) - [Command Line Arguments](Tools/switchers_arguments.md) - [NVASM](Tools/NVASM) - [SafeDiskLauncher](Tools/SafeDiskLauncher) From 8c6496c2b4a59226f9e2c1ac3172c4a0e1648e2f Mon Sep 17 00:00:00 2001 From: DevGeniusCode <136935333+DevGeniusCode@users.noreply.github.com> Date: Fri, 14 Mar 2025 12:41:27 +0200 Subject: [PATCH 2/2] Fix --- SourceCode/Tools/CNCTools/assetcull.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SourceCode/Tools/CNCTools/assetcull.md b/SourceCode/Tools/CNCTools/assetcull.md index cfb02db3..50d57d95 100644 --- a/SourceCode/Tools/CNCTools/assetcull.md +++ b/SourceCode/Tools/CNCTools/assetcull.md @@ -6,7 +6,7 @@ The **AssetCull** tool is a program that removes duplicate files from a source d If an identical file is found in both directories, it is deleted from the source directory, and a batch file (Batch file) is generated containing the deletion commands, allowing you to easily remove the duplicate files later. -This tool is part of a suite of utilities that come with the source code for **C&C Generals & Zero Hour**. +This tool is part of a suite of utilities that come with the source code for **C&C Generals Zero Hour**. ---