Synctoy的简单命令行执行方式如下:

  1. “[System Drive]\Program Files\SyncToy 2.1\SyncToyCmd.exe” -R MyFolderPair  

直接在cmd窗口运行是要加上面的引号的,然后创建的MyFolderPair名称中间是不能有空格的

这样结合任务计划程序自由度就很高了,此方法的详细帮助文档如下:

Run SyncToy from a Command Line

SyncToy can be run from the command line to provide support for scheduling or automating folder pair execution. The command line executable by default is located at: [System Drive]\Program Files\SyncToy 2.1\SyncToyCmd.exe.

SyncToy does not support running multiple copies of SyncToyCmd.exe at the same time. If a second instance of SyncToyCmd.exe is executed, there will be no errors and the command will not be executed.

The parameters provided by this command line interface are described below:

  • -R Run all folder pairs that are marked as Active For Run All.
  • -R [Name] Run the named folder pair (only one folder pair can be specified).

Usage Examples:

  • SyncToyCmd -R MyFolderPair
  • SyncToyCmd -R

NOTE: There can be no space between the -R parameter and the MyFolderPair name.

It is also possible to manage folder pairs from the command line. Note: Folder pairs are managed through SyncToy.exe whereas scheduling is performed through SyncToyCmd.exe as described above.

SyncToy does not support running multiple copies of SyncToy.exe at the same time. If SyncToy is already running in in the Task Bar, and a second instance of SyncToy.exe is launched with or without any command line parameters, it will simply bring the already running instance into focus and no errors will be reported.

The parameters associated with SyncToy.exe are described below:

  • -d(left=, right=, name=,operation=Synchronize|Echo|Contribute, [check=yes|no], excluded=,included=) Creates a new folder pair with the specified options:
    • left – mandatory, provide absolute path for left folder
    • right – mandatory, provide absolute path for right folder
    • name – mandatory, provide name of folder pair
    • operation – mandatory, specifiy action type for this folder pair
    • check – optional, specify whether file contents should be checked for file matching, default is no
    • excluded – optional, specifies exclude filter for files, defaults to none
    • included – optional, specifies include filter for files, defaults to all
  • -u Delete one or more folder pairs, no user data will be deleted
  • -? Display Help

Sample Usage:

  • SyncToy -d(left=e:\,right=c:\Pictures, name=MyPictures,operation=contribute)
  • SyncToy -uMyPictures

示例:

bat:"D:\myNewPrograms\SyncToy\SyncToyCmd.exe" –R SyncToyTest1


下载地址:链接:http://pan.baidu.com/s/1i5LqPy1 密码:552q



浏览 669 评论 0 赞 0 砸 0 标签: 工具
评论
还可以再输入500个字

请您注意

·自觉遵守:爱国、守法、自律、真实、文明的原则
·尊重网上道德,遵守《全国人大常委会关于维护互联网安全的决定》及中华人民共和国其他各项有关法律法规
·严禁发表危害国家安全,破坏民族团结、国家宗教政策和社会稳定,含侮辱、诽谤、教唆、淫秽等内容的作品
·承担一切因您的行为而直接或间接导致的民事或刑事法律责任
·您在NoteShare上发表的作品,NoteShare有权在网站内保留、转载、引用或者删除
·参与本评论即表明您已经阅读并接受上述条款