相关疑难解决方法(0)

比较两个文件夹并输出两个文件夹中丢失的文件

我想比较两个文件夹,严格来说是文件名。(不是文件内容)。我在 Windows 10 上,想使用命令行工具。

这是可以解释问题的场景。

Folders
-------
source                  source2 
   - file_1                 - file_1
   - file_2                 - file_2
   - file_3                 - file_4
   - file_5                 - file_5
   - file_6                 - file_7


Output should be:
-----------------
Source  -> Missing files file_4  
Source2 -> Missing files file_3  
Run Code Online (Sandbox Code Playgroud)

我做了一些研究,有很多diff工具,但我对比较文件内容不感兴趣。我想要的只是比较两个文件夹并输出两个文件夹中缺少哪些文件(与另一个文件夹相比)。

我不喜欢使用 Powershell。

谢谢你。

command-line batch-file cmd.exe windows-10

8
推荐指数
1
解决办法
1万
查看次数

标签 统计

batch-file ×1

cmd.exe ×1

command-line ×1

windows-10 ×1