Move File From One Repository To Another
Jan 17, 2023
12:12 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Jan 17, 2023
12:12 PM
Move File From One Repository To Another
What function do I call to move a file from one repository to another. I have tried 'MoveFile', but that only seems to work when moving files from directory to another inside the same repository. I want to utilise the same functionality that can be accessed through the backend GUI in the repositories from within my service. Is this possible?
Solved! Go to Solution.
Labels:
- Labels:
-
Troubleshooting
ACCEPTED SOLUTION
Accepted Solutions
Jan 17, 2023
11:49 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Jan 17, 2023
11:49 PM
Use the following service...
FileTransferSubsystem > Copy
.
// result: INFOTABLE dataShape: "FileTransferJob"
let result = Subsystems["FileTransferSubsystem"].Copy({
async: undefined /* BOOLEAN */,
sourceRepo: undefined /* STRING */,
metadata: undefined /* JSON */,
targetRepo: undefined /* STRING */,
targetFile: undefined /* STRING */,
targetPath: undefined /* STRING */,
queueable: undefined /* BOOLEAN */,
sourceFile: undefined /* STRING */,
sourcePath: undefined /* STRING */,
timeout: undefined /* INTEGER */
});
1 REPLY 1
Jan 17, 2023
11:49 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Jan 17, 2023
11:49 PM
Use the following service...
FileTransferSubsystem > Copy
.
// result: INFOTABLE dataShape: "FileTransferJob"
let result = Subsystems["FileTransferSubsystem"].Copy({
async: undefined /* BOOLEAN */,
sourceRepo: undefined /* STRING */,
metadata: undefined /* JSON */,
targetRepo: undefined /* STRING */,
targetFile: undefined /* STRING */,
targetPath: undefined /* STRING */,
queueable: undefined /* BOOLEAN */,
sourceFile: undefined /* STRING */,
sourcePath: undefined /* STRING */,
timeout: undefined /* INTEGER */
});
![](/skins/images/695EE5AD3E567050FEDD72575855ED93/ptc_skin/images/icon_anonymous_message.png)