Possible data loss in transit using movefile

2 views (last 30 days)
Ben Mercer
Ben Mercer on 10 Apr 2018
Edited: YT on 10 Apr 2018
I am using the inbuilt function movefile to move a folder containing data files to another directory. movefile encountered an error "Unknown error occurred.", however I believe the error was due to some of the files having too long names.
When I inspected the source and destination folders, some of the data from the source folder was now missing from both the source and destination folders. Has anyone else experienced similar behavior?
If it is possible for movefile to irrecoverably loses data in transit when it encounters an error, I'd suggest this needs to be patched.
  1 Comment
YT on 10 Apr 2018
Edited: YT on 10 Apr 2018
I also had some trouble with moving files a while back because I had too long file names/paths. While it's not really a solution, I just renamed/shortened the filenames (and thus path) which seemed to work for me.

Sign in to comment.

Answers (0)


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


Community Treasure Hunt

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

Start Hunting!