Code Assist MCP for Microsoft SharePoint

Build 25.0.9540

RenameAttachmentOrDocument

SharePoint ライブラリ内の添付ファイルまたはドキュメントの名前を変更します。コンテンツに影響を与えずにファイル名を更新するのに役立ちます。SourceFileURL で指定されるパスは、URL 接続プロパティで使用したものに対する相対パスである必要があります。

Stored Procedure-Specific Information

Examples follow:

To rename a document in a SharePoint library:

/* URL = https://mysite.sharepoint.com/sites/Subsite */
EXEC RenameAttachmentOrDocument
  SourceFileURL = '/Shared Documents/Source Folder/Subfolder/Original Document.txt',
  NewFileName = 'Renamed Document.txt';

To rename a document at the root of a library:

/* URL = https://mysite.sharepoint.com */
EXEC RenameAttachmentOrDocument
  SourceFileURL = '/Shared Documents/Dummy_23.txt',
  NewFileName = 'Dummy_00002.txt';

To rename a document in a nested folder structure within a site collection:

/* URL = https://mysite.sharepoint.com/sites/Subsite */
EXEC RenameAttachmentOrDocument
  SourceFileURL = 'Shared Documents/Test Folder 1/Test Nested Folder 1/Test Document 2.txt',
  NewFileName = 'Test Document 2 Renamed.txt';

Input

Name Type Required Description
SourceFileURL String True 名前を変更するファイルまたは添付ファイルの相対パス。このパスはSharePoint 接続プロパティで指定されたベースURL に対する相対パスです。
NewFileName String True ファイルの新しい名前(ファイル拡張子を含む)。例:'UpdatedDocument.pdf'。

Result Set Columns

Name Type Description
Success Boolean 名前変更操作が成功したかどうかを示します。成功の場合は'true'、失敗の場合は'false' を返します。

Copyright (c) 2026 CData Software, Inc. - All rights reserved.
Build 25.0.9540