The command to compare two folders in windows is a command-line tool that allows users to compare two folders.
On our PCs, we all have backup folders. As a consequence, two backup folders with identical names may exist, and you will be unsure which is which. When this occurs, deciding which folders to retain and which to delete may be challenging. You may manually check both directories, but if there are too many files with identical names, the issue may arise. You’ll need a program to compare folders in Windows 10 to prevent wasting time.
The comparison tools can show you how the folders are similar and different depending on many criteria. You may transfer files straight from the File Explorer to the hard disk, flash drive, emails, or just trash them after you understand the differences.
In Windows 10, there are five different ways to compare folders.
To compare the contents of two folders, whether it’s file sizes, file formats, or backed-up data, there are Windows 10 tools, inbuilt choices, and third-party applications. We’ve compiled a list of quick methods to compare folders in Windows 10.
1. Use the Command Prompt
Let’s start with the built-in method. In Windows 10, you may compare folders using Command Prompt. Everything in Windows 10 has commands, and if you’re familiar with the command line, you can use everything this way.
In Windows 10, you may use Robocopy to compare folders. It is pre-installed in Windows 10.
In the Start menu’s search box, press Windows key + S and type cmd. From the search results, choose Command Prompt.
Type the following command on the Command Prompt terminal and click Enter.
“Folder 1 Path” “Folder 2 Path” robocopy /L /NJH /NJS /NP /NS /L /NJH /NJS /NP /NS
Both the folders’ locations must be specified in the command.
This is how the command will appear:
robocopy “1UsersUrviDesktopFolder C:UsersUrviDesktopFolder C:UsersUrviDesktopFold 2UsersUrviDesktopFolder C:UsersUrviDesktopFolder “/L /NJH /NJS /NP /NS /L /NJH /NJS /NP /NS
If you don’t put in the correct path for the folder/directory, you’ll receive problems while running the command.
The following is the output of this command.
1UsersUrviDesktopFolder C:UsersUrviDesktopFolder
*EXTRA FILES abc.bat, abc.bat, abc.bat, abc.
sshot-6.png is an additional file.
sshot-8.jpeg is an additional file.
a new file called sshot-2.png has been created.
taskkill.lnk is a new taskkill.lnk file.
Folder 2 has abc.bat, sshot-6.png, and sshot-8.png, but Folder 1 does not. In the same way, sshot-2.png and taskkill.lnk are found in Folder 1 but not in Folder 2.
The result does not show the files that are present in both directories. As a result, some users may perceive the results to be excessively basic and uninformative as comparison tools. The robocopy command is ideal if all you want to know is what files are missing in the source and destination folders.
You may also use the Command Prompt to compare two files. This may be helpful for developers and authors who work with files that have various versions and need to distinguish between them.
Using the CD command, go to the place where the files are stored in the terminal window.
As an example,
C:UsersUrviDesktopFolder 1 cd C:UsersUrviDesktopFolder 1 cd C:UsersUr
To compare the two files, use the fc command, as illustrated below. Text files were compared.
file1.txt file2.txt fc fc fc fc fc fc fc f
In the output below, you can see the lines that are different. You may include the file path before the file name if the files are in separate places, as illustrated below.
fc C:UsersUrviDesktopFile1.txt C:UsersUrviDesktopFile2.txt
Make that the command includes the file extension and that the file names are accurate; otherwise, the program will fail to locate the file in the specified folder.
WinDiff is the second option.
In Windows 10, you may use WinDiff to compare folders using a graphical interface. It was created by Windows and may be downloaded from their website. The program is simple to use, with no unnecessary icons or features.
To begin, download and extract the WinDiff application. The software will be downloaded in a zip file after the installation procedure is complete. Before you use it, make sure you remove it.
To launch the RunWinDiff.exe file, open the extracted folder and double-click it. Add the path to the windiff.exe file and double-check that it’s in the correct place; otherwise, you won’t be able to compare the files. After you’ve entered the path, click the three dots to add the folder. Next to the three dots is another icon that allows you to upload a file for comparison.
Finally, with Windows 10, click the search icon to compare folders.
The results of the file comparison will be presented in a new window. You’ll get a comprehensive file comparison, including both similar and different files.
To view the contents of the file, click the Expand button.
Under the Options menu, you may alter the view of the result and make modifications to what should be displayed.
You may experiment with the option to view various comparison results and file differences. WinDiff may also be used to compare two files.
3. Using WinMerge
To compare folders in Windows 10, you may use WinMerge, a third-party program. The software is secure and simple to use.
Step 1: To begin the installation, download WinMerge from its official website and double-click on the installation file. To begin, press the Run button.
Step 2: After reading the licensing agreement, click Next.
Step 3: Choose where you want WinMerge’s program files to be saved. If you’re unsure about the location, leave it alone. Next should be selected.
Step 4: Leave WinMerge alone when it comes to installing plugins and features. If you wish, you may install the languages package.
After you’ve completed all of the steps, click Next.
Step 5: Choose any additional tasks you want. It’s a good idea to enable Explorer’s context menu integration. Then press the Next button.
Step 6: When you get to the Ready to Install box, double-check all of the options before clicking Install.
Step 7: To finish the installation and start the WinMerge program on your computer, click Finish.
Step 8: After installing WinMerge, click the Ctrl + O keys at the same time to open a new comparison window.
Step 9: To add the folder/directory location, click the Browse option. Also, for both folders, tick the box next to Read-only.
Set the Folder Filter to *.* and choose Include Subfolders from the drop-down menu.
To begin the comparison, click on Compare. The comparison result may take a long time if the folder includes hundreds of files and subfolders.
In the following tab, you’ll see the comparison result. You can view the filenames and extensions, as well as the right and left file dates. The extension column may assist you in determining file kinds.
You may compare files by double-clicking on them and looking at the differences. If it’s a text file, the contents will be shown in two side-by-side windows. The Perspective option in the menu bar allows you to quickly alter the view of the comparison result.
4. Using PowerShell
If you like creating PowerShell programs, you’ll appreciate how Windows 10 compares folders. Scripts are only enjoyable if we understand how to use them; otherwise, they may be difficult to comprehend. You may test out the script below in PowerShell to see whether it suits your needs.
To launch Windows PowerShell, press Windows key + X and choose it from the fast link menu.
Type the following script into the PowerShell window and hit Enter.
Get-ChildItem -Recurse -path C:UsersUrviDesktopFolder1 $fso = Get-ChildItem -Recurse -path C:UsersUrviDesktopFolder1 $fso = Get-ChildItem Get-ChildItem -Recurse -path C:UsersUrviDesktopFolder2Compare-Object -ReferenceObject $fsoBU = Get-ChildItem -Recurse -path C:UsersUrviDesktopFolder2Compare-Object -ReferenceObject $fsoBU = Get-ChildItem -DifferenceObject $fso $fsoBU
Credit for the Script
Change the folder1 and folder2 directories here to suit your needs.
The comparison’s result indicates that abc.bat, sshot-6.png, and sshot-8.png are present in Folder 2 but absent from Folder 1. File1.txt, file2.txt, sshot-2.png, and taskkill.ink, on the other hand, are present in Folder 1 but not in Folder 2.
You may use the aforementioned analysis to map your output.
5. Third-Party Software
In Windows 10, WinMerge is a well-known third-party program for comparing folders. If you want additional third-party app choices, you may go through the list below.
Total Commander is a strategy game.
When it comes to files and folders, Total Commander is a one-stop shop. It may be used as a file manager or a tool for comparing folders. You may also use Total Commander to synchronize the files/folders if there are any discrepancies. The application is simple to use and offers an excessive number of functions to assist you with files and folders.
Total Commander may be downloaded here.
Meld
Meld is a program that allows developers and programmers to compare files, directories, and version control projects. It’s ideal for developers who work with many files and need to keep track of code changes on a regular basis. Meld allows you to compare files in two or three different ways. Git, Subversion, Bazaar, and a variety of other software are all supported by the tool. With this tool, code comparison becomes simple.
Meld may be downloaded here.
DiffMerge
DiffMerge compares and merges files graphically on Windows, macOS, and Linux operating systems. It may be used to compare folders and files. The advanced tool makes checking for duplicate files and directories a breeze. This utility may be included into File Explorer if desired. The tool is simple to use and adaptable to the requirements of the user.
DiffMerge may be downloaded here.
FreeFileSync
FreeFileSync is a free and open-source program for comparing folders on Windows 10. It is a smart program that may assist you in taking intelligent backups of your data. This program allows you to make backup copies of all of your important data on your computer. FreeFileSync also assists you with file synchronization on Windows, Mac, and Linux.
FreeFileSync may be downloaded here.
Conclusion
Visually comparing document files and folders may be a lot of time-consuming effort. When a folder has 100s or 1000s of subfolders and files, manually checking them becomes difficult. In Windows 10, you may compare folders using tools, commands, and scripts.
You can compare, combine, and synchronize folders using third-party programs. You may also compare folder contents using the Command Prompt terminal and PowerShell. If you need a user interface for comparing files, WinMerge and WinDiff are excellent choices. In Windows 10, you may compare folders in a variety of ways; you can use whatever technique you want.
The total commander compare folders is a Windows 10 application that allows users to compare files and folders.
Frequently Asked Questions
How can I compare two folders?
To compare two folders, you can use the command line tool diff to find differences between them.
How do I compare files and folders in Windows 10?
In Windows 10, you can compare two files or folders by right-clicking them and selecting Compare with.
How do you compare two folders and copy missing files?
You can use the Windows file explorer to compare two folders and copy missing files.
Related Tags
- windiff download windows 10
- windiff windows 10
- compare two folders windows 10 powershell
- winmerge compare folders
- compare two windows directories