@@ -90,3 +90,34 @@ set to a nonempty value.
90
90
.. option :: --devel-debug
91
91
92
92
Do not use pyout callbacks, do not swallow exceptions, do not parallelize.
93
+
94
+
95
+ Examples
96
+ --------
97
+
98
+ - When working in a local clone of a Dandiset, a file
99
+ :file: `sub-01/sub-01_blah.nii.gz ` can be renamed to
100
+ :file: `sub-02/sub-02_useful.nii.gz ` in both the local clone and on the server
101
+ with::
102
+
103
+ dandi move sub-01/sub-01_blah.nii.gz sub-02/sub-02_useful.nii.gz
104
+
105
+ To rename the file only in the local or remote instance, insert ``--work-on
106
+ local `` or ``--work-on remote `` after ``move ``.
107
+
108
+ - When not working in a local clone of a Dandiset, a file can be renamed in a
109
+ remote Dandiset on a server by providing a resource identifier for the
110
+ Dandiset to the ``--dandiset `` option. For example, in order to operate on
111
+ Dandiset 123456 on the main ``dandi `` instance, use::
112
+
113
+ dandi move --dandiset DANDI:123456 sub-01/sub-01_blah.nii.gz sub-02/sub-02_useful.nii.gz
114
+
115
+ To operate on Dandiset 123456 on ``dandi-staging ``, you can use::
116
+
117
+ dandi move --dandiset https://gui-staging.dandiarchive.org/dandiset/123456 sub-01/sub-01_blah.nii.gz sub-02/sub-02_useful.nii.gz
118
+
119
+ - To move the contents of a folder :file: `rawdata/ ` to the top level of a
120
+ Dandiset, you can use the ``--regex `` option to strip the ``rawdata/ `` prefix
121
+ from the beginning of all matching asset paths::
122
+
123
+ dandi move --regex "^rawdata/" ""
0 commit comments