Function moveFileEval

  • Move a file to a SharePoint drive using Microsoft Graph API.

    Parameters

    • ctx: Context
    • token: string

      Access token from getSharePointTokenUserAuth

    • options: {
          destinationPath: string;
          driveId: string;
          fileId: string;
          parentId: string;
      }
      • destinationPath: string

        Destination path (e.g. , '/path/to/destination.txt')

      • driveId: string

        Drive ID (e.g. , 'ab!5xqiQKeGnEGeI02fc4Mu5HrH_BkaM1FNnCohEqq7eEnQYz1prATORbPSv-3951Ny')

      • fileId: string

        File ID (e.g. , '01NKDM7HMOJTVYMDOSXFDK2QJDXCDI3WUK')

      • parentId: string

        Destination parent folder ID (e.g. , '01NKDM7HMOJTVYMDOSXFDK2QJDXCDI3WUK')

    Returns Promise<any>

    Return move response

    const moveResponse = await moveFileEval(ctx, token, {
    driveId: 'ab!5xqiQKeGnEGeI02fc4Mu5HrH_BkaM1FNnCohEqq7eEnQYz1prATORbPSv-3951Ny',
    fileId: '01NKDM7HMOJTVYMDOSXFDK2QJDXCDI3WUK',
    destinationPath: '/path/to/destination.txt',
    });