用于比较CSV的批处理文件 [英] Batch File for Comparing CSV

查看:79
本文介绍了用于比较CSV的批处理文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

帮助请求: 嗨 

我有3个Excel CSV文件

FileAA.csv- Live plant 

FileBB.csv - 模拟工厂



我想比较AA和BB文件并保存FileCC.csv中的差异



我想从BATCH文件中执行它,操作符将从桌面执行..



我玩过这个脚本,但它似乎没有做我想做的事,也没有填充FileCC.csv



$ file1 = import-csv -Path" E:\FileAA.csv"      

$ file2 = import-csv -Path" E:\FileBB.csv" 



Compare-Object $ file1 $ file2 -property col1,col2 -IncludeNotEqual



希望你能指出我正确的方向

解决方案

你的代码不是批处理文件。 它是PowerShell。


我们不会修改在互联网上找到的脚本。我建议您联系一位顾问来帮助您。


请参阅:
此论坛用于编写脚本问题而不是脚本请求


Help Request:Hi  
I have 3 Excel CSV Files
FileAA.csv- Live plant 
FileBB.csv - Simulation Plant 

I would like to compare both AA  and BB files and save the differences in FileCC.csv

I would like to execute this from a BATCH File an operator will execute from the desktop..

I have played with this script but it does not seem to do what I want it to do nor does it populate FileCC.csv

$file1 = import-csv -Path "E:\FileAA.csv"           
$file2 = import-csv -Path "E:\FileBB.csv"  

Compare-Object $file1 $file2 -property col1,col2 -IncludeNotEqual

Hope you can point me in the right direction

解决方案

You code is not a batch file.  It is PowerShell.

We do not modify scripts found on the Internet.  I recommend contacting a consultant to help you with this.

Please see: This forum is for scripting questions rather than script requests


这篇关于用于比较CSV的批处理文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆