Create a shortcut to a file in a script

12 vues (au cours des 30 derniers jours)
Edward
Edward le 15 Oct 2013
Commenté : Jan le 15 Oct 2013
Hi, i have two problems,
I need to check if a folder exists, it not i create a folder.
After this i need to create a shortcut to a text file in this new or existing folder.
How do i check if a folder exists and create a file shortcut in MATLAB?
  1 commentaire
Jan
Jan le 15 Oct 2013
What exactly is "a shortcut" here?

Connectez-vous pour commenter.

Réponses (1)

Matthew Crema
Matthew Crema le 15 Oct 2013
To create a folder if it does not exist:
if ~exist(foldername,'dir')
mkdir(foldername)
end
To create a shortcut you might use your operating system's appropriate command. Type "help system" at the MATLAB command line.

Catégories

En savoir plus sur Environment and Settings 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