MoveAttachmentOrDocument
SharePoint 内で添付ファイルやドキュメントをあるフォルダから別のフォルダに移動します。コンテンツを整理し、構造化されたドキュメントライブラリを維持するのに役立ちます。
Stored Procedure-Specific Information
The MoveAttachmentOrDocument stored procedure moves a file or attachment to a different location within SharePoint. The SourceFileURL parameter specifies the path to the source file, and the DestinationFolderURL parameter specifies the destination folder path.To move a document to a different folder within the same library, enter:
EXEC MoveAttachmentOrDocument List = 'Documents', SourceFileURL = '/Shared Documents/Dummy_000.txt', DestinationFolderURL = '/Shared Documents/Archive/';
The paths specified should be relative to the URL connection property.
Input
| Name | Type | Required | Description |
| List | String | True | ドキュメントや添付ファイルが移動される元のSharePoint リストまたはドキュメントライブラリの名前。 |
| SourceFileURL | String | True | 接続プロパティのサイトURL に基づく、ソースファイルの相対URL。 フォーマット例: ルートディレクトリファイル:/Shared Documents/filename.txt サブディレクトリファイル:/Shared Documents/MyFolder/filename.txt 接続プロパティがサイトコレクションを指している場合、相対URL はベースサイト内のパスに対応します。特定のサイトを指している場合、相対URL はそのサイトからの相対URL となります。 |
| DestinationFolderURL | String | True | ドキュメントまたは添付ファイルが移動する宛先フォルダの相対URL。 フォーマット例: ルートディレクトリ:/Shared Documents/ サブディレクトリ:/Shared Documents/MyFolder/ SourceFileURL と同様に、相対URL は接続プロパティがサイトコレクションに設定されているか、特定のサイトに設定されているかによって異なります。 |
Result Set Columns
| Name | Type | Description |
| Success | Boolean | 操作が成功したかどうかを示します。移動が正常に完了した場合は'true' を、そうでない場合は'false' を返します。 |