Character Limitations in File Migration

Understanding filename restrictions and how they're handled during migration to Microsoft 365.

Last updated: 2025-01-15 Plan & Prepare

Invalid Characters Automatically Replaced

*
→ _
:
→ _
<
→ _
>
→ _
?
→ _
/
→ _
\
→ _
|
→ _
"
→ _

Overview

Microsoft restricts certain special characters in OneDrive and SharePoint filenames. During migration, Cloudiway automatically handles most character issues by replacing invalid characters with underscores (_) to ensure successful file transfer.

Automatic Handling

Most character issues are resolved automatically during migration. However, understanding these limitations helps you prepare your data and avoid potential issues.

Invalid Characters

File and folder names cannot contain these special characters in OneDrive and SharePoint:

Forbidden Characters

"

Double quote

*

Asterisk

:

Colon

<

Less than

>

Greater than

?

Question mark

/

Forward slash

\

Backslash

|

Pipe

These characters are automatically replaced with underscores (_) during migration to create valid filenames in the target environment.

Special Characters (# and %)

The hash (#) and percent (%) characters require special handling:

Important Considerations

#

Hash character

Requires special configuration to enable. May be translated by default rules.

%

Percent character

Requires special configuration. Can cause URL encoding issues.

Metadata Limitation

For files containing # or % characters, permissions and metadata cannot be retrieved. The files will be migrated but may lose some associated data.

Path Length Restrictions

Microsoft imposes length restrictions on file paths:

Component Maximum Length
Individual filename or folder 128 characters
Full file URL 400 characters

Google Drive has unlimited path lengths, so files migrating from Google may exceed these limits and require special handling.

The zTruncated Folder Solution

When migrating files with paths exceeding 400 characters, Cloudiway uses a special solution to ensure no data is lost:

How It Works

  1. 1 URLs exceeding 400 characters are automatically detected
  2. 2 Affected files are placed in a folder named zTruncated at the OneDrive root
  3. 3 A reference file is created documenting the original file location

Example Structure

OneDrive/
├── Documents/
│   └── Projects/
│       └── ... (normal files)
└── zTruncated/
    ├── file1.docx
    ├── file2.xlsx
    └── _reference.txt  ← Contains original paths

Recommendations

Before Migration

  • • Audit files with # or % characters
  • • Identify deeply nested folder structures
  • • Rename files with invalid characters if metadata is important
  • • Consider flattening deep hierarchies

After Migration

  • • Check the zTruncated folder for relocated files
  • • Review the reference file for original locations
  • • Manually reorganize files if needed
  • • Verify file permissions were transferred correctly

Metadata Preservation

For files where permissions and metadata are critical, rename files containing # or % characters before migration to ensure all data is preserved.

Was this article helpful?

We value your feedback

Help us improve your experience

What would you like to share with us?

Need direct support? Open a ticket