大网数据广告活动
安装更新与部署

MoveFiles Action

· 52CE 我爱测

The MoveFiles action locates existing files on the user's computer and moves or copies those files to a new location.

The MoveFiles action locates existing files on the user's computer and moves or copies those files to a new location. The MoveFiles action queries the MoveFile table and moves files specified there if the component linked to the entries is specified to be install locally or is being run from source.

Sequence Restrictions

The MoveFiles action must come after the InstallValidate action and before the InstallFiles action.

ActionData Messages

Field Description of action data
[1] Identifier of moved file.
[6] Size of installed file in bytes.
[9] Identifier of directory holding moved file.

Remarks

The MoveFiles table contain a column named "options" which specifies the source files to be moved or copied. A moved source file is deleted after it has been copied to a new location. For the exact syntax, see the MoveFile table.

The SourceFolder and DestFolder columns of the MoveFile table are property names whose values are expected to resolve to fully qualified paths. These properties can be any of the directory entries in the Directory table, any predefined folder property (FavoritesFolder, for example), or a property set by any entry in the AppSearch table. These properties may contain a full path containing the file name to a specific file. For example, the AppSearch table can be authored to search for a particular file and set a property to the full path to that file. In this example, the SourceName column in the MoveFile table can be left blank to indicate that the value in the SourceFolder property contains a full file path. The semicolon is the list delimiter for transforms, sources, and patches and should not be used in file names or paths.

The MoveFiles action does not act on entries in the MoveFile table in which either the SourceFolder or DestFolder property does not evaluate to a full path.

The MoveFiles action attempts to move or copy all files in the source directory that match the name given in the SourceName column of the MoveFiles table. The name in the SourceName column can include either the * or ? wildcards which allow a group of files to be moved or copied. For example, the SourceName column may contain an entry of "*.xls" and the MoveFiles action moves or copies every Microsoft Excel workbook from the source directory to the destination.

The name to be given to the destination file can be specified in the DestName column of the MoveFile table. The destination file name retains the source file name if this column is left blank.

If a "*" wildcard is entered in the SourceName column of the MoveFile table and a destination file name is specified in the DestName column, all moved or copied files retain the names in the sources.

Files that are moved or copied by the MoveFiles action are not deleted when the product is uninstalled.

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。