How to list different files between two folders

including sub folders, on the Windows command line - Noob vs. Pro

AI Noob Answer:

"Use the "forfiles" command:

for /f %i in ('dir /b /s "C:\path\to\directory1"') do @if not exist "C:\path\to\directory2\%~nxi" @echo %i
... oops, I broke my fingers again. command is a total failure as '%~nxi' does not contain sub folder names!

Another way is to use "robocopy":

robocopy "C:\path\to\directory1" "C:\path\to\directory2" /L /XJ /XO /XF *.*
... why not add options /c /o /m /p /l /e /x ... ? anyway, it produces just junk output.

Dear ChatGPT, thank you for all the hopelessly complex and non functional answers. Let me summarize them in a neutral and professional way:

You're fired!


 

Pro Answer:

Forget the above junk, download the free open source SFK for any system and type:

sfk list -sincedir dir1 dir2

Done. Example output:

[dif] dir2\foo.txt
[dif] dir2\foo2.txt
[add] dir2\bar.txt

Read more details here.

Office workers in uproar!
   How to send files to another computer in the LAN

Science discovered something unbelievable!
   How to replace a word in all .txt files of a folder