Users syncing the pathname as folder name

Haley Cline 0 Reputation points
2025-08-14T14:09:05.68+00:00

Users are syncing folders, then the folder is named the path of the folder. For example, say the folder being synced is called "Documents" and has the path Department > Team > Documents. The folder is called Department - Team - Documents and is not correctly synced. Users are therefore saving files to these folders and they are not being saved to the folder they are intending. Furthermore, they cannot rename these folders when synced. We have tried unsyncing and resyncing but the same thing occurs. We have also tried unlinking and relinking OneDrive but that does not help either. How do we get the folders to just sync from their top level and not sync as the full path?

If there's any important information I'm leaving out to help resolve this problem, please just let me know!!

EDIT: The problems are occurring for private channels. Does that make a difference? Is there any way around this?

Microsoft 365 and Office | OneDrive | For business | Windows
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Tamara-Hu 1,950 Reputation points Microsoft External Staff Moderator
    2025-08-14T15:22:16.48+00:00

    Hello @Haley Cline

    Thank you for posting your valuable question on Microsoft Q&A forum. 

    According to your description, here are a few steps you can try to resolve your issue: 

    Sync Only the Top-Level Folder 

    • Go to SharePoint or OneDrive in your browser.  Navigate to the document library or folder you want to sync. 
    • Open the top-level folder only  Instead of syncing from a nested folder (e.g., Department > Team > Documents), open just the Documents folder. 
    • Click “Sync”  Use the Sync button at the top of the page. This will initiate OneDrive sync for that folder. 
    • Check the folder name in File Explorer  The folder should now appear in your File Explorer with the name Documents, not the full path. 
    • Avoid syncing from deep paths  If you sync from a nested folder view, OneDrive may name the folder using the full path to avoid conflicts. 

    Use Symbolic Links to Rename Synced Folders 

    If you’re stuck with a folder named like Department - Team - Documents, you can create a symbolic link to make it appear as Documents. 

    Requirements 

    • Windows OS 
    • Admin privileges (recommended) 

    Steps to Create a Symbolic Link 

    Press Windows + S, type cmd, right-click Command Prompt, and choose Run as administrator. 

    • Locate the synced folder. Example path:  C:\Users\YourName\OneDrive - Company\Department - Team - Documents 
    • Create a symbolic link. Run this command: mklink /d "C:\Users\YourName\Documents" "C:\Users\YourName\OneDrive -Company\Department - Team - Documents" 

    This creates a folder called Documents that links to the actual synced folder. 

    • You can now save files to C:\Users\YourName\Documents, and they’ll sync via OneDrive. 

    Reset OneDrive Sync 

    • Unlink OneDrive: Right-click the OneDrive icon in the system tray > Settings > Account > Unlink this PC. 
    • Clear OneDrive cache: Run: %localappdata%\Microsoft\OneDrive\onedrive.exe /reset 
    • Re-sign in and resync only the top-level folder 

    For related information, please check: 


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. User's image

    1 person found this answer helpful.

  2. Tamara-Hu 1,950 Reputation points Microsoft External Staff Moderator
    2025-08-16T08:54:07.17+00:00

    Hi @Haley Cline,
    Thank you for your confirmation and additional information.
    When I posted the first answer, I didn't see your Edited Information about the private channels. Please forgive me if the first answer didn't work.

    Based on your additional information, this issue happened to the private channels, and from a SharePoint view, the documents that are syncing incorrectly from OneDrive are the document "In channels" vs. "In site library".

    I did some deeper research, and this is what I've acknowledge so far:

    • When syncing a private channel, OneDrive uses the SharePoint site name and the document library/folder name to generate the folder name.
    • For private channels, a separate SharePoint site is created, which includes both the Team name and the Channel name.

    This is not exactly an issue, but more likely to be how OneDrive is structured to sync files from a private channel. This naming is by design and helps distinguish between different libraries and channels, especially in organizations with many Teams and channels.

    Let me provide you with some workarounds you may want to try:
    Create a Windows Shortcut:

    • Right-click on the sync folder > Create shortcut (If you cannot see the Create shortcut option, please click Show more Options first).
    • Rename the shortcut the way you want it (For example: Documents).
    • Place it wherever you want (e.g., Desktop or inside OneDrive)
    • You can manually give permission to access this folder to other members if you want.

    Use a Different Sync Method

    Instead of syncing the entire channel, you can:

    • Go to the SharePoint site behind the Teams channel.
    • Navigate to the specific folder you want.
    • Use “Add shortcut to OneDrive”, this adds the folder to your OneDrive with a simpler name.

    Or you can Add shortcut to OneDrive directly in your Teams channels:**
    User's image** For your reference: Add shortcuts to shared folders in OneDrive - Microsoft Support

    Rename a Synced Private Channel Folder in OneDrive/Explorer

    1. Sync the folder from Teams/SharePoint (it will have the full path name).
    2. Navigate to the folder in File Explorer:
    • Go to the View tab > Show > Hidden items.
    • Then go to Options > View tab.
    • Uncheck “Hide protected operating system files.”
    • Click Apply and OK.
    1. Create or Copy a desktop.ini File:
    • Open Notepad and paste the following content:
    [.ShellClassInfo]
    
    LocalizedResourceName=[your folder name]
    
    • Save the file as desktop.ini inside the synced folder.
    1. Customize Folder Properties:
    • Right-click the folder in the left navigation pane of File Explorer.
    • Select Properties > Customize tab.
    • Check and then uncheck “Also apply this template to all subfolders.”

    Click OK.

    1. Verify the Change
    • The folder should now appear as "your folder name" in File Explorer.
    • Sync functionality with Teams and SharePoint remains intact.

    Important Notes

    • This method only changes the visual name in File Explorer.
    • The actual folder name and sync path remain unchanged in OneDrive and SharePoint.
    • Other users will not see this renamed folder unless they apply the same method locally.
    • This workaround is safe and does not interfere with sync operations.

    If you need clarifications or assistance on any steps, please don't hesitate to reply. I'm happy to assist further!


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. User's image


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.