How do I create a list of duplicate files? Suppose I have two folders, one called "sources-original" and the other one called "sources-mod".
The folder "sources-mod" has only some modified files from the folder "sources-original"Using the utility "Double Killer" I can find and delete the files in "source-mod" that are equal to those found in "sources-original" so that the folder "source-mod" will contain only modified files/different from the originals.
This is very useful to save harddrive space.But now comes a problem, suppose I want to restore (or copy) the files DoubleKiller deleted, how can I do? (By hand I can not, as we are talking of thousands of files in hundreds of folders).
Does anyone know a utility like DoubleKiller that is capable of generating a batch files that can do such a "copy back"?
Or anyone knows an utility capable of generating a *formatted log* so that with a few operations with NopePad I can turn it into a batch-file?
(The DoubleKiller log-file first puts the file name and then his path, making it impossible for me to change the log-file into a batch-file by hand, too many operations of cut&paste)Very very thanks!
@echo off > newfile & setLocal enableDELAYedeXpansion for /f "tokens=* delims= " %%a in ('dir/b/a-d src') do (
if exist dest\%%a echo.%%a >> newfile
)
=====================================
Life is too important to be taken seriously.M2
mmm, this code does NOT produce a list of double files (they must be verified by CRC).
but thanks for your help!
Much depends on the crc tool. ==========================================
@echo off > newfile & setLocal enableDELAYedeXpansionfor /f "tokens=* delims= " %%a in ('dir/b/a-d src') do (
if exist dest\%%a call :sub1 %%a
)goto :eof
:sub1
for /f "tokens=2 delims= " %%i in ('crc32 src\%1') do (
set S=%%i
crc32 dest\%1 !S! > nul
if !errorlevel! equ 0 >> newfile echo.%1
)
goto :eof
=====================================
Life is too important to be taken seriously.M2
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |