Copyfile with variable as destination

8 vues (au cours des 30 derniers jours)
Bradley Robert
Bradley Robert le 29 Mai 2019
Commenté : Stephen23 le 29 Mai 2019
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.

Réponse acceptée

Walter Roberson
Walter Roberson le 29 Mai 2019
saveName = '1234_fMRI'
copyfile('*fMR*', saveName)

Plus de réponses (0)

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Tags

Produits


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by