Copyfile: WSL directories (\\wsl$Ubuntu\....) as the arguments gives me this error: "The name of the file cannot be resolved by the system."

4 ビュー (過去 30 日間)
Márcia Nunes
Márcia Nunes 2022 年 4 月 23 日
コメント済み: Jan 2022 年 4 月 25 日
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 件のコメント
Márcia Nunes
Márcia Nunes 2022 年 4 月 25 日
I have been trying to use copyfile with other files and I noticed that it does not works for nifti files (.nii) but for others it does. The files I been trying to copy are Nifti files.
Jan
Jan 2022 年 4 月 25 日
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?

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by