TransWikia.com

Incomplete path when using NotebookDirectory[] in ver 12.1.0 and Dropbox

Mathematica Asked by Jonathan Urrutia on November 18, 2020

I just upgraded from version 11.3.0 to version 12.1.0 and I am struggling with the directory of my .nb file. Usually I start all my .nb with

SetDirectory[NotebookDirectory[]]

But in this new version the past command sets my directory two levels above from the actual NotebookDirectory. I noted that this only happens when my files are inside of Dropbox.

Does anyone has this problem too? It didn’t happen to me with version 11.

One Answer

Do any of the folders in your folder structure include a special character (like ä, é, è, etc...)? I ended up on this question when searching about this issue myself. Once I removed the special characters in the folder structure the notebook was saved in, it worked as expected. As you mentioned though, this wasn't the behavior for previous versions (I tested using version 10.2).

The result of NotebookDirectory[] will be the folder in the structure who's full path does not contain any special character. IMO, it should be reverted back to the old behavior.

Answered by Emy on November 18, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP