Load File from Local Disk

View as MarkdownMarkdown

Set up your AI agent

Give your coding agent live access to the GroupDocs documentation and API reference through the GroupDocs Docs MCP server — no install, no API key. Learn more

claude mcp add --transport http groupdocs-docs https://docs.groupdocs.com/mcp

Also process documents locally

The GroupDocs.Comparison MCP server lets your agent work with files on your machine; they are never uploaded. It needs the .NET 10 SDK or Docker.

claude mcp add groupdocs-comparison -- dnx GroupDocs.Comparison.Mcp --yes
Folders, licensing and more →

When source and target files are on the local disk, pass their paths directly to Comparer and add(). Both absolute and relative paths work.

Example: Load files from local disk

from groupdocs.comparison import Comparer

def load_file_from_local_disk():
    with Comparer("./source.docx") as comparer:
        comparer.add("./target.docx")
        comparer.compare("./result.docx")
        print("Documents compared successfully. Check output in result.docx.")

if __name__ == "__main__":
    load_file_from_local_disk()

source.docx is the source file used in this example. Click here to download it.

target.docx is the target file used in this example. Click here to download it.

Binary file (DOCX, 25 KB)

Download full output