4

我正在使用摩托罗拉 MC67(我不确定这是否重要,但它是一个便携式设备),我想编写一个批处理脚本来将文件移动到那里。问题是我无法调用设备路径,因为它没有安装而且我无法安装它。我在谷歌上找不到任何关于不是从 Windows GUI 访问设备的信息。我在某个地方读到了 activeSync 可以从便携式设备同步,但这对我没有用。无论如何,我再说一遍,我需要一种将文件从我的计算机移动到未安装的便携式设备的方法。安装设备的方法也很好,因为我可以从批处理文件中访问它

4

3 回答 3

7

首先,您需要下载Windows Mobile Developer Power Toys,因为它包含cecopy该解决方案所依赖的实用程序。

基本上,您需要做的就是:

cecopy file.exe dev:\file.exe

这是cecopy的自述文件。

INSTRUCTIONS:
Usage:  CeCopy  [options] <Source_FileSpec>  <Destination>

Options:

    /is                  Copy file even if identical.
    /s                   Include subdirectories, hierarchy reproduced on device.

Arguments:

    Source_FileSpec      File specification denoting the source of the copy.
    Destination          Where files should be copied to.

For the source, wild cards or directory names may be specified, as may be single files.  The destination can be either a directory or a file name, depending on the type of source specified.

By default, an argument is assumed to live on a local file system.  To indicate that either argument denotes a location on a device connected via ActiveSync, prepend 'dev:' to that argument.   To articulate that a local file system is referenced, prepend 'desk:' to the argument.

Examples:
"cecopy readme.txt dev:\readme.txt" copies this readme to the device's root.
"cecopy /s *.* dev:\" copies all files and subfolders of current directory to device's root.  Generates new folders on device as needed.
"cecopy /s *.dll dev:\windows" copies all dlls and dlls in subfolders of current directory to the device's root.  Generates new folders on device as needed.
于 2013-07-12T16:30:57.897 回答
3

好吧,你不能挂载设备本身,但您可以通过Windows Portable Devices api 访问它。这里有一些应用程序示例,但它们是用 C++ 编写的。有一个脚本界面,但这似乎仅限于设备阶段体验,并且似乎无法从 Powershell 中获得。

于 2013-07-10T17:50:44.853 回答
1

总指挥识别设备,可用于通过它传输文件,并可用于程序化

于 2013-07-18T22:28:32.733 回答