Appearance
Function: moveFileEval()
ts
function moveFileEval(
ctx: Context,
token: string,
options: {
driveId: string;
parentId: string;
fileId: string;
destinationPath: string;
}): Promise<any>;Defined in: src/ms-graph/sharepointGraphEval.ts:921
Move a file in a SharePoint drive via the Graph API (browser eval variant).
Parameters
| Parameter | Type | Description |
|---|---|---|
ctx | Context | The SDK context. |
token | string | Access token from getSharePointTokenUserAuth. |
options | { driveId: string; parentId: string; fileId: string; destinationPath: string; } | The move options. |
options.driveId | string | The drive ID containing the file. |
options.parentId | string | The destination parent folder ID. |
options.fileId | string | The file ID to move. |
options.destinationPath | string | The new name or path for the file. |
Returns
Promise<any>
The move response object from the Graph API.
Example
ts
const token = await getSharePointTokenUserAuth(ctx, authProps);
const result = await moveFileEval(ctx, token, {
driveId: 'drive-abc123',
parentId: 'completed-folder-id',
fileId: 'in-progress-file-id',
destinationPath: 'proposal-final.docx',
});
console.log('Moved to:', result.name);