var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-333696-1']); _gaq.push(['_trackPageview']); _gaq.push(['_trackPageLoadTime']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();
  • 2011年01月11日

    WinDiff命令行

    分类:

    切换到WinDiff所在目录,在cmd窗口中运行windiff /?,蹦出WinDiff命令行帮助:

    Usage:

     

         windiff [options] path1 [path2]

     

    Options:

     

    -D  Compare one directory only.

    -F[flags] savefile Save composite file to 'savefile'.  The 'flags' may consist of one or more of I

     

    (identical), L (left), R (right), F (moved leFt), G (moved riGht), S (Similar left), A (similiAr right), X

     

    (exit after saving list).

    (e.g. -FLF saves list of Left or moved-leFt lines).

    -I file  Reads list of files to compare, from the specified input file.  Each line can contain one

     

    or two filenames, space delimited (with quoting, if filenames contain spaces).  Use "-" as the

     

    filename to read from stdin.  If a line contains only one filename, the file is compared to itself.

    -N name  NET SEND notification to 'name' at end of comparison.

    -O Outline view (no automatic expansion).

    -P  Perverse comparison: breaks lines on punctuation.

    -S[flags] savefile Save list of files to 'savefile'.  The 'flags' may consist of one or more of S

     

    (same), L (left), R (right), D (different), X (exit after saving list).

    (e.g. -SLD saves list of Left or Different files).

    -T  Compare whole subtree.

    -SkipDirectoryReparsePoints  Silently skip any directory that is a reparse point; this can be used

     

    to prevent infinite recursion and crashing on circular mount points or symbolic links.

     

    下面举一例说明,假设存在AB两个文件夹,AB多一个文件,则可以运行:

    windiff -D -T -FL "E:\Download\a.txt" C:\Users\alias\Desktop\A C:\Users\alias\Desktop\B

    WinDiff界面窗口弹出,文件E:\Download\C.txt内容为:

    -- C:\Users\alias\Desktop\A : C:\Users\alias\Desktop\B -- .\sd.txt -- includes left-only, lines

    -- 0 lines listed

     

    windiff -D -T -S "E:\Download\a.txt" C:\Users\alias\Desktop\A C:\Users\alias\Desktop\B

    WinDiff界面窗口弹出,文件E:\Download\C.txt内容为:

    -- C:\Users\v-fafeng\Desktop\A : C:\Users\v-fafeng\Desktop\B -- includes left-only,differing files

    .\sd.txt    only in C:\Users\v-fafeng\Desktop\A  ????????  --------

    -- 1 files listed

    []可见其输出文件列表文件是ANSI格式,并且还需要英语locale才能正常显示。

    分享到:

    历史上的今天:

    网页播放器 2010年01月11日