Create a shortcut to a file in a script

6 次查看(过去 30 天)
Edward
Edward 2013-10-15
评论: Jan 2013-10-15
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 个)

Matthew Crema
Matthew Crema 2013-10-15
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.

类别

Help CenterFile Exchange 中查找有关 Environment and Settings 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by