This Python script allows you to compare the contents of either two files or two folders and output the differences in a readable format.
- Python 3.x installed on your system
- Clone or download this repository to your local machine.
- Open a terminal or command prompt.
- Navigate to the directory where the script is located.
- Run the script by executing the following command:
python diff_tool.py
- Follow the prompts to enter the paths of the files or folders you want to compare.
- The script will generate a diff output file named
diff_output.txt
containing the differences between the files or folders.
- You can input either two file paths or two folder paths.
- Both inputs must be of the same type (i.e., two files or two folders).
- If there are no differences between the files or folders, the script will indicate so.
- If there are differences, the script will output them in a unified diff format and save them to a file named
diff_output.txt
.
-
Comparing two files:
Enter the path of the first file or folder: file1.txt Enter the path of the second file or folder: file2.txt
-
Comparing two folders:
Enter the path of the first file or folder: folder1 Enter the path of the second file or folder: folder2
This project is licensed under the MIT License - see the LICENSE file for details.