Hi everyone,
Here is ma challenge
I need to compare lots of files in a .Net batch process. My batch process is a .Net component. He will be launch from a scheduler program.
The job of the batch component is :
Here is what I needs (or think I need…) :
I need help on points 6, 7 and 8. I read a lot of post. But I need all parts together. Please keep in mind I’m in a VB.Net context
The following is only what we do in a batch file Proof Of Concept « .Bat » :
Thanks
Frankie
Here is ma challenge
I need to compare lots of files in a .Net batch process. My batch process is a .Net component. He will be launch from a scheduler program.
The job of the batch component is :
• Reading informations from a Database/Table to build a list of compare to do.
• Finaly, the batch component will launch the process to compare all the occurrences (in command line).
Informations are :
• The path/name of the file1, file2, result report.
• The type of file to compare
• The exclusions to apply
• The type of file to compare
• The exclusions to apply
• Finaly, the batch component will launch the process to compare all the occurrences (in command line).
Here is what I needs (or think I need…) :
1. It’s clear, I don’t use the UI at all. I use command line to start a compare process. So please don’t refer me to a UI fonctionnality
2. The batch process execute a tons of compare process. He don’t wait the completion of the first execute and launch the second, the third, …
3. Each process need to be isolated and don’t affect others process. I presume, I need to use the « /solo » switch
4. The compare process is going to be done on a server. UI is not permit. I presume, I need to use the « /silent » switch
5. I want to compare file by file. No folders compare
6. I need to specify a type of file for each compare process (script file @)
7. I need to specify a type of exclusion per compare process. The exclusion is not preset, it can be specify on the fly by the Database data from the batch process. Did I have to use : Workspace in association with a configFile ? And finaly specify the workspace in the command line?
(script file @ vs Workspace ???)
8. I need to create a repport ONLY if there is a difference. Normaly, on a command/batch file « .bat », we use « BCOMP /quickcompare » first. And we don’t use the BComp (full compare) if he don’t detect a difference. But In a .Net Program how I do this ? I need to catch the errorlevel !
2. The batch process execute a tons of compare process. He don’t wait the completion of the first execute and launch the second, the third, …
3. Each process need to be isolated and don’t affect others process. I presume, I need to use the « /solo » switch
4. The compare process is going to be done on a server. UI is not permit. I presume, I need to use the « /silent » switch
5. I want to compare file by file. No folders compare
6. I need to specify a type of file for each compare process (script file @)
7. I need to specify a type of exclusion per compare process. The exclusion is not preset, it can be specify on the fly by the Database data from the batch process. Did I have to use : Workspace in association with a configFile ? And finaly specify the workspace in the command line?
(script file @ vs Workspace ???)
8. I need to create a repport ONLY if there is a difference. Normaly, on a command/batch file « .bat », we use « BCOMP /quickcompare » first. And we don’t use the BComp (full compare) if he don’t detect a difference. But In a .Net Program how I do this ? I need to catch the errorlevel !
I need help on points 6, 7 and 8. I read a lot of post. But I need all parts together. Please keep in mind I’m in a VB.Net context
The following is only what we do in a batch file Proof Of Concept « .Bat » :
Command line for Quick compare :
"C:\Program Files (x86)\Beyond Compare 3\bcomp.com" /quickcompare /solo
C:\Temp\file1.xml C:\Temp\file2.xml
Error level tell me if there is a difference:
if errorlevel = 2
Execute a command line compare:
"C:\Program Files (x86)\Beyond Compare 3\bcomp.exe" /silent /solo
@C:\Temp\Detail.txt C:\Temp\file1.xml C:\Temp\file2.xml C:\Temp\NewReport1.html
"C:\Program Files (x86)\Beyond Compare 3\bcomp.com" /quickcompare /solo
C:\Temp\file1.xml C:\Temp\file2.xml
Error level tell me if there is a difference:
if errorlevel = 2
Execute a command line compare:
"C:\Program Files (x86)\Beyond Compare 3\bcomp.exe" /silent /solo
@C:\Temp\Detail.txt C:\Temp\file1.xml C:\Temp\file2.xml C:\Temp\NewReport1.html
Thanks
Frankie
Comment