Effacer les filtres
Effacer les filtres

change to user directory

4 vues (au cours des 30 derniers jours)
Paul Huter
Paul Huter le 21 Fév 2017
Réponse apportée : Rik le 21 Fév 2017
I have two computers, one with the "user directory" of "C:\Users\fullname\Documents" and the other "C:\Users\partialname\OneDrive\Documents". I have a script that I would like to be able to run on both computers, and not need to change. I would like to be able to have the script save my output file to "C:\Users\somename\Documents\GMAT", but since the user directory is different for both computers, I'm not sure how to do this without changing my user directories.
Suggestions? Thoughts?
Thanks.

Réponse acceptée

Rik
Rik le 21 Fév 2017
I have a FEX (file exchange) submission that does exactly that: it finds the path of the function, so you make your code portable.

Plus de réponses (0)

Catégories

En savoir plus sur Search Path dans Help Center et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by