Matterway
    Preparing search index...

    Function moveFile

    • Moves a file from one location to another within SharePoint.

      Parameters

      • client: Client

        The Microsoft Graph client instance.

      • options: {
            fileId: string;
            driveId: string;
            destinationFolderId: string;
            destinationDriveId: string;
        }

        The options for moving the file.

        • fileId: string

          The ID of the file to move.

        • driveId: string

          The ID of the drive containing the file to move.

        • destinationFolderId: string

          The ID of the destination folder.

        • destinationDriveId: string

          The ID of the drive containing the destination folder.

      Returns Promise<void>

      A promise that resolves when the file has been moved.

      const client = await getSharePointClient(opt);
      const options = {
      fileId: 'file-id',
      driveId: 'source-drive-id',
      destinationFolderId: 'destination-folder-id',
      destinationDriveId: 'destination-drive-id'
      }
      await moveFile(client, options);