[英]How to create vbscript or bat file to overrite an existing xml file
[英]How to create a .bat file which compares the files in a folder with a xml file
我想創建一個.bat文件,該文件將文件夾中的文件與已經具有文件名的xml文件進行比較。 它不應該尋找訂單。 我將提供文件夾路徑和xml文件。 我想要的輸出是文件夾中缺少的文件列表
未經測試:
@echo off
set "xml_file=c:\xml.xml"
set "directory=c:\dir\"
for %%$ in ("%directory%*") do (
fc "%xml_file%" "%%~f$" >nul 2>nul && (
echo "%xml_file%" and
echo "%%~f$" are identical
color
) || (
echo "%xml_file%" and
echo "%%~f$" are NOT identical !!!
color
)
)
在開頭更改文件和目錄的路徑。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.