文档

​
​

Development

User Acquisition

Monetization

工业

Unity Version Control

DevOps

On-prem

Gluon

Editor plug-in

Open Unity Dashboard

Unity Version Control

此页面不支持所选语言。
​
​
Unity Version Control
  • Overview
  • Cloud Repositories organization update
  • Installation
  • Use UVCS with the Unity Editor
  • Unity Version Control plugins
  • Concepts
  • Tutorials
  • On-Prem
  • Gluon
  • CLI and shortcut references
    • Unity Version Control CLI
    • CLI help
    • Pipe commands
    • cm find
    • Windows keyboard shortcuts
  • Release Notes
  1. Unity Version Control (previously Plastic SCM)

Pipe commands

Use the pipe command in the Unity Version Control CLI for advanced scripting.
阅读时间2 分钟
最后更新于 10 个月前

The UVCS command line can read arguments from standard input (stdin) one by one if you use the
-
option.
For example, you can add three files at the same time:
>cm add -a.txtb.txtc.txtThe selected items are about to be added. Please wait ...Item c:\Users\pablo\wkspaces\mcga\a.txt was correctly addedItem c:\Users\pablo\wkspaces\mcga\b.txt was correctly addedItem c:\Users\pablo\wkspaces\mcga\c.txt was correctly added
This allows you to pipe output from other commands into
cm
. For example, you can combine commands to create automations such as to add all files under a specific directory tree:
find /path/to/dir | cm add -

Commands that accept piped paths

The following commands accept piped paths:
  • add
  • applylocalchanges
  • checkin
  • checkout
  • getstatus
  • partialcheckin
  • remove
  • shelveset create
  • undocheckout
  • undochange
  • uncounchanged
  • Wktreenodestatus

Pipe examples

Pipe from the Windows
dir
command

The following example pipes from the Windows
dir
command to remove files that match a specific pattern from a workspace:
>dir /S /B *.txt | cm rm -Item c:\Users\pablo\wkspaces\mcga\a.txt has been removed.Item c:\Users\pablo\wkspaces\mcga\b.txt has been removed.Item c:\Users\pablo\wkspaces\mcga\c.txt has been removed.Item c:\Users\pablo\wkspaces\mcga\z.txt has been removed.Item c:\Users\pablo\wkspaces\mcga\lockwkB\file.txt has been removed.Item c:\Users\pablo\wkspaces\mcga\src_dir\dest_dir\a.txt has been removed.Item c:\Users\pablo\wkspaces\mcga\src_dir\dest_dir\b.txt has been removed.Item c:\Users\pablo\wkspaces\mcga\src_dir\dest_dir\c.txt has been removed.

Checkout files recursively into piped directory arguments

Directory of c:/mcga/pipe11/05/2020 19:48 <DIR> .11/05/2020 19:48 <DIR> ..11/05/2020 17:57 <DIR> dir11/05/2020 19:46 <DIR> dir211/05/2020 19:47 12 dirlist1 File(s) 12 bytes4 Dir(s) 23,714,631,680 bytes freec:/mcga/pipe>type dirlistdirdir2c:/mcga/pipe>type dirlist | cm partial co -r -The selected items are about to be checked out. Please wait ...Item c:/mcga/pipe/dir was correctly checked outItem c:/mcga/pipe/dir/file was correctly checked outItem c:/mcga/pipe/dir2 was correctly checked outItem c:/mcga/pipe/dir2/file2 was correctly checked out

Copyright © 2026 Unity Technologies
法律信息隐私政策CookiesDocumentation Terms of Use请勿出售或分享我的个人信息您的隐私选择(Cookie 设置)

“Unity”、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属公司在美国和其他地方的商标或注册商标(此处查看更多信息)。其他名称或品牌是其各自所有者的商标。

为方便起见,一些页面是机器翻译的,可能包含不准确的内容。如有信息不一致的情况,以英文版本为准。

  • 在本页上
    • Commands that accept piped paths

    • Pipe examples

      • Pipe from the Windows dir command

      • Checkout files recursively into piped directory arguments


报告此页面的问题