 |
www.ice-graphics.com The main forum for the ICE-Graphics software
|
| View previous topic :: View next topic |
| Author |
Message |
williamhdixon
Joined: 05 Mar 2012 Posts: 2
|
Posted: Thu Mar 08, 2012 2:49 pm Post subject: how to do COMPARE from command line / batch (ICE Mirror) |
|
|
I'm running ICE Mirror v2.0 on Windows XP and Windows 7 (two different machines, obviously).
From the GUI, I can click the button labeled "Compare", and it will give me a list of files that are different or missing between the Master and Mirror directories. The help file doesn't tell how to do this from the command line, but the (only) example given shows ".... /APEND ....". I assumed that I could tell it ".... /COMPARE ....", but that seems to have done the same as doing a "full" mirror.
Background. I created a new file in the source/master directory. I then ran
| Code: | | ICEMirror.exe <sourcedir> <targetdir> /COMPARE /MODE=1 /Root=true /CASE=false /DOS=true /LOG=true |
But it copied the file, and the log file says:
| Code: | File is copied - F:\full/path/to/file.txt
Mirror (full) finished |
I tried using both /COMPARE" and "/Compare".
Basically, what I want to do in a script is to first do a full mirror, and then follow up with a compare, making sure that the only thing in the resulting log file is "Mirror (full) finished". Sometimes IceMirror doesn't seem to copy all of the files, and this is the best way I can figure out to make sure everything gets copied.
Is this possible from the command line? |
|
| Back to top |
|
 |
ICE Graphics Site Admin
Joined: 31 Mar 2003 Posts: 399
|
Posted: Thu Mar 08, 2012 6:17 pm Post subject: Re: how to do COMPARE from command line / batch (ICE Mirror) |
|
|
| williamhdixon wrote: | | Sometimes IceMirror doesn't seem to copy all of the files, and this is the best way I can figure out to make sure everything gets copied. |
If you want to be sure what everything is copied start ICE Mirror twice. But I have never had a situation that some files were not copied.
From command line you can not execute compare without mirror. I am not sure, what this is mode really need. |
|
| Back to top |
|
 |
williamhdixon
Joined: 05 Mar 2012 Posts: 2
|
Posted: Thu Mar 08, 2012 7:44 pm Post subject: |
|
|
I *have* started running it twice. I don't check everything every time (it's a quasi-unattended operation) so I don't know the specifics, but in some of the directories there are quite a few files missing. They seem to be at the bottom of the list, sometimes by filename sometimes by date. They could have been removed somehow else, I have no way of knowing.
I guess I'll have to come up with a way to count the number of files in source and target directories (and subdirectories), and raise an alert if they are different.
You really should consider adding the 'compare' option to command line mode. Besides the possibility of files just getting missed, there's always the possibility that a file may not be able to be copied because it's open or something. (If I have a file open in MS Word from the source directory, IceMirror cannot copy it.) Since the command line is used to automate the mirroring process, this would let people automate the process of making sure the two directories are in fact identical, and deal with it if they are not.
In fact, what I would love would be a command line option to compare the two directories, and indicate a pass/fail condition (exactly equal vs some differences) using either a return code or by displaying the results. Either way can be captured by a batch script (I use perl, but even *.bat files can do this), and the script can proceed as needed. |
|
| Back to top |
|
 |
ICE Graphics Site Admin
Joined: 31 Mar 2003 Posts: 399
|
Posted: Fri Mar 09, 2012 7:53 am Post subject: |
|
|
If there are some missing file try to determine them. It's easy if you can see different number of files in directories.
There are some cases then ICE Mirror can not copy files. For example, ICE Mirror can not copy locked or corrupted files. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|