Rename file when using copyfiile

91 views (last 30 days)
Hello, I would like to rename a file that I've just succesfully copied. The basic code is the following
filename = 'myfilename.dat'
source = fullfile('mysourcepath',filename)
destiantion = fullfile('mydestinationpath',filename)
copyfile(source,destination)

Accepted Answer

madhan ravi
madhan ravi on 18 Nov 2018
  4 Comments
Marisabel Gonzalez
Marisabel Gonzalez on 18 Nov 2018
I also tried that and still got the error. However, I managed to rename it using copyfile again. Thanks anyway!

Sign in to comment.

More Answers (0)

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Tags

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!