- ·上一篇:怎么找到系统自带word
- ·下一篇:word表格分两页断开怎么居中
word文档怎么快速查询同名
2025-01-27 13:19:37
1.批处理如何查找同名文件
@echo off
set "whatif=0" %此处填1立即执行复制,填0显示代码执行结果不做任何处理%
if "%whatif%"=="0" (set "whatif=-whatif")else set "whatif="
set "a=a" %文件夹1%
set "b=b" %文件夹2%
powershell "ForEach($i in '%a%','%b%'){Set-Variable -Name $i -Value (dir $i).BaseName;Get-ChildItem -File $i|Copy-Item -Destination{if((Get-Variable -Name $i).Value -eq $_.BaseName){'c'}} %WhatIf% -ErrorAction Ignore -Force}"
pause