Copyfile: WSL directories (\\wsl$Ubuntu\....) as the arguments gives me this error: "The name of the file cannot be resolved by the system."
10 views (last 30 days)
Show older comments
I downloaded a dataset using Windows Subsystem for Linux (WSL) and so the paths start like this: "\\wsl$ubuntu\home\<user_name>\dataset_name\".
I am currently using Matlab 2019a in Windows 10.
I want to use the function copyfile to copy a file from one folder inside the dataset to another, also inside the dataset folder. This is what I tried:
copyfile('\\wsl$\Ubuntu\home\<user_name>\<dataset_name>\inputs\raw\<filename>', '\\wsl$\Ubuntu\home\<user_name>\<dataset_name>\<output_folder>\')
This is the error I get:
Error using copyfile
The name of the file cannot be resolved by the system.
Do you know how to deal with WSL directories using Matlab (R2019a) in Windows?
6 Comments
Jan
on 25 Apr 2022
This sounds rather strange. The operating system does not know anything about the contents on a file. That the file name ends with ".nii" does not matter in any way. Therefore I'm sure, that there is another problem. Maybe the destination file is already opened by another software?
Answers (0)
See Also
Categories
Find more on Downloads 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!