Syncing files to a OneDrive folder to upload to Sharepoint

Get help for specific problems
Posts: 3
Joined: 6 Aug 2025

moseshull

I added a M: drive to a server of 500gb.
I installed OneDrive and had it put the file location to M:\OD
I added a sync for a SharePoint CLS-DATA
I ran a sync from the z:\cls-data to the M:\od\CLS Company\cls-data
When the files are written to the OneDrive location the file size changes.
Is there a way to set the to sync only look name/data/time and not look at the file size?

Image
Posts: 3
Joined: 6 Aug 2025

moseshull

I could not get the script provided to work so I used this one.
Source Website
https://github.com/29039/29039s-useful-stuff/blob/main/m365-sharepoint-online-set-parserdisabled.md


Script 1 - Prerequisites installation stage 1 (Run as Admin):
------
#Prerequisites installation stage 1 (Run as Admin)
#https://chocolatey.org/install
#https://nodejs.org/en/download/package-manager/#windows
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
choco install -y nvs
#powershell needs restarting for nvs to actually work
Write-Host "Please exit powershell and re-open" -ForegroundColor Green
Pause
exit
Make sure you EXIT powershell after you run Script 1, or Script 2 won't work.

Script 2 - Prerequisites installation stage 2 (Run as Admin):
--------
#Prerequisites installation stage 2 (Run as Admin)
#https://pnp.github.io/cli-microsoft365/user-guide/installing-cli/
nvs add lts
nvs use lts
npm install -g @pnp/cli-microsoft365
------


Script 3 - Change the ParserDisabled to true (No need to run as Admin):

(Make sure you update the $SiteURL and $SiteList as applicable)

-------------------
#Actually use the CLI for Microsoft 365 to change ParserDisabled to true (No need to run as Admin)
#vars
$SiteURL = "https://contoso.sharepoint.com"
$SiteList = "Documents"

#lets go
m365 version
m365 login --authType browser
$SiteID = m365 spo list get --webUrl $SiteURL --title $SiteList --properties "Id" --output "json" | ConvertFrom-JSON
m365 spo list get --webUrl $SiteURL --title $SiteList --properties "Id,ParserDisabled"
m365 spo list set --webUrl $SiteURL --id $SiteID.ID --parserDisabled true

#end it
m365 logout
-------------------