Copyfile with variable as destination

4 次查看(过去 30 天)
I am trying to copy a folder (A) in a directory, to the same directory with a variable as a name, but Matlab doesn't recognize the variable
Example:
saveName = 1234_fMRI
copyfile = *fMR* saveName
This creates a new folder in the directory called "saveName" where it needs to be a folder called 1234_fMRI
Help. Please.
Brad R.

采纳的回答

Walter Roberson
Walter Roberson 2019-5-29
saveName = '1234_fMRI'
copyfile('*fMR*', saveName)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

标签

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by