NIH | National Cancer Institute | NCI Wiki  

Error rendering macro 'rw-search'

null

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 15 Next »

This page is a work in progress.

If your user account has the Write or Own permission level on an existing collection in DME, you can move one or more data files or collections to that existing collection in the following ways:

  • If that existing collection has been configured to contain another collection, you can move a collection to it. 
  • If that existing collection has been configured to contain data files, you can move a file to it.

You can also rename a collection or file. 

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

    {
     "moveRequests": [
      {
       "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. 
  3. Run the following command:

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

The following table describes each parameter:

ParameterDescription
<move-description.json>

The name of the JSON file containing the list of source and destination locations in the following format:

{
 "moveRequests": [
  {
   "sourcePath": <full path in DME to the file/collection to be moved>
   "destinationPath": <full path in DME to the new file/collection>
  }
 ]
}
[rename-status-file]An optional path and filename. 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]
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 response header (response from the server) in that file.


For example, consider the following command:

dm_rename “my-move-list.json”

With the following code in the my-move-list.json file, the command moves and renames a collection and a file:

{
  "moveRequests": [
   {
     "sourcePath": "/TEST_Archive/PI_Lab1/Project_Orig",
     "destinationPath": "/TEST_Archive/PI_Lab2/Project_New"
   },
   {
     "sourcePath": "/TEST_Archive/PI_Lab1/Project_Name1/File_Orig",
     "destinationPath": "/TEST_Archive/PI_Lab2/Project_Name2/File_New"
   }
 ]
}
  • No labels