Copyfile with variable as destination

5 Ansichten (letzte 30 Tage)
Bradley Robert
Bradley Robert am 29 Mai 2019
Kommentiert: Stephen23 am 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.

Akzeptierte Antwort

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

Weitere Antworten (0)

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by