NIH | National Cancer Institute | NCI Wiki  

Error rendering macro 'rw-search'

null

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. In your file system, create a JSON file that specifies a list of source and destination locations, as follows:

    Code Block
    {
     "moveRequests": [
      {
       "sourcePath": <full path in DME to the file/collection to be moved>
       "destinationPath": <full path in DME to the new file/collection>
      },
      {
       "sourcePath": <full path in DME to the file/collection to be moved>
       "destinationPath": <full path in DME to the new file/collection>
      }
     ]
    }
  2. Make sure that the destination collection or file does not already exist. each sourcePath and destinationPath pair in the JSON file meets the following criteria:
    • In the value of your destinationPath, the last part (collection name or data file name) is new.

    • In the value of your destinationPath, the other parts already exist.

    • Change only one part of the destinationPath at a time, in order from parent to child.

  3. Run the following command:

    Code Block
    dm_rename <move-description.json> [rename-status-file] [REST-response]

    The following table describes each parameter:

    ParameterDescription
    <move-description.json>A path to the JSON file containing the source and destination locations.
    [rename-status-file]An optional path and filename in your file system. If you specify this parameter, the system creates the specified file in the specified location and saves the status of the move or rename operation (the response from the server) in that file.
    [REST-response]
    Include Page
    shared info - REST-response parameter
    shared info - REST-response parameter

...

Code Block
{
  "moveRequests": [
   {
     "sourcePath": "/Example_Archive/PIProject_Lab1Orig/Project_Orig",
     "destinationPath": "/Example_Archive/PIProject_Lab2Orig/Project_New"
   },
   {
     "sourcePath": "/Example_Archive/PI_Lab1/Project_Orig/File_Orig",
     "destinationPath": "/Example_Archive/PI_Lab2/Project_New/File_New"
   }
 ]
}

In this example, each sourcePath and destinationPath pair in the JSON file meets the above-mentioned criteria, as follows:

  • In the first pair, only