Are you shutting down all non-essential programs before starting the game, especially anti-virus and any backup programs that may be monitoring the My Documents folder?
Windows Defender's Controlled Folder Access feature has caused this error. In that case an exception for the game can be made in Start, Settings, Updates & Security, Windows Security, Virus & threat protection, 'Allow an app through Controller folder access'. This feature can also be disabled: in Windows Defender select 'Virus & Threat Detection' then 'Virus & Threat Detection Settings', and scroll down to 'Controlled Folder Access'.
A few people have also had BitDefender block the game from being able to create files and folders, which has caused similar errors (generally indicating a specific folder, no question mark or non-path slashes). In that case, including both the game executables and Larian Studios My Documents folder in BitDefender's trusted app and directory sections should fix the problem (Advance Threat Defense, Ransomware Protection / Safe Files, Application Access).
Try creating a new Windows user account with a standard My Documents folder (not stored in a One Drive folder, as Windows 10 likes to do), and switch to that account to test.
If that helps, since you can not exclude folders from OneDrive syncing (except to delete the local files and keep the ones in the cloud), you can switch accounts to play, or it is possible to run the game as a different user from your current user account (or shut down OneDrive before starting the game).
To run the game as a different user, exit the Steam client (if necessary), then hold Shift and right click the Steam shortcut and select 'Run as different user' (should work the same for Galaxy with the GOG version, or directly from the executable). You will then be prompted for a user name and password (you'll need to have set a password for the other account). After that, when you run the game it will save to the My Documents folder for the other account, and so should bypass the problem. You can set up a shortcut to do this automatically.
https://www.sevenforums.com/tutoria...rtcut-create-specified-program-user.htmlhttps://www.sevenforums.com/general...ly-run-shortcut-runas-w-credentials.htmlYou can exit Steam and restart to play other games, that also save to My Documents, so you don't split the saves between your current user account and the alternate one.
If Windows Defender or OneDrive are not the issue:
Try verifying local files: in the Steam library, right click on the game and select Properties, switch to the Local Files tab and then click on the 'Verify Integrity of Game Cache...' button.
With the GOG version, in the (optional) Galaxy client, select Divinity: Original Sin 2 in the left column, then click on the More button, and in the Manage menu select 'Verify / Repair'.
Try browsing to the '..\Documents\Larian Studios\Divinity Original Sin 2 Definitive Edition\LevelCache' folder and delete the contents. A corrupt file there can cause problems, though generally when saving or loading.
If applicable, disable Steam cloud support either globally (in the client click on the Steam menu and select Settings, and then Cloud) or just for this game (in the library right click Divinity: Original Sin 2 and select Properties, then switch to the Updates tab and check the Steam Cloud section).
Alternately, exit out of the Steam client, or Galaxy for the GOG version, and just start the game directly from the executable when required.
Next, browse to the '..\Documents\Larian Studios' folder and rename the 'Divinity Original Sin 2 Definitive Edition' folder.
This folder contains the saved games, configuration files and a level cache folder. Deleting or renaming it will get the game to recreate it on startup; playing the game from a different Windows user account would effectively do the same thing. With Steam running and cloud support enabled, the client would just download the cloud copy of your existing profile.
Next, extract the replacement folder from
this download into your '..\Documents\Larian Studios' folder.
After that, see if you can start D:OS 2 DE. If so, create a new profile and maybe check that you can start a new game and save/load. If that works, exit and copy a couple saves from the renamed folder into the newly created profile's ..\Savegames\Story folder. If that continues to let you start the game and load the saves, move the rest of the saves over.
If you continue to get this error, delete the new My Documents D:OS 2 DE folder and rename the original back again.
Try doing a clean boot and then test the game. Click Start, or hit WinKey-R, type in msconfig and hit enter; in the General tab, click Selective Startup, uncheck Load startup items (if required) and leave Load system services and Use original boot configuration options checked. Next, click on the Services tab, check the box to Hide all Microsoft services, then click the Disable All button (maybe make a note of which are currently enabled/disabled), then click OK and reboot the computer.
Run msconfig again to switch back to the normal boot configuration.