How to get rid of '._' files on a hard disk?

조회 수: 50 (최근 30일)
Shayma Al Ali
Shayma Al Ali 2019년 11월 15일
답변: Image Analyst 2019년 11월 16일
Hello everyone!
I'm working on analyzing some images with a code, and all my files and matlab codes are running on an external hard disk. I was having trouble running my code until I realized that my files contained a '._' at the beginning. I read online that these are common with mac files that are then read on a windows disk (I believe thats the case). Is there anyway I can overwrite this?
  댓글 수: 2
per isakson
per isakson 2019년 11월 15일
"Is there anyway I can overwrite this?" Do you want to rename the files? If so, how?
Shayma Al Ali
Shayma Al Ali 2019년 11월 15일
I want to get rid of the '._' in the beginning of the file name.

댓글을 달려면 로그인하십시오.

답변 (2개)

Walter Roberson
Walter Roberson 2019년 11월 15일
Getting rid of the ._ at the beginning of the name is usually the wrong thing to do. Those files contain extended attributes, not data contents. ._YourFunction.m is not the content of YourFunction.m and instead it is file information about YourFunction.m

Image Analyst
Image Analyst 2019년 11월 16일
Just skip it
for k = 1 : numFiles
thisFileName = allFiles{k}; % Get the full or base file name somehow.
if startsWith(thisFileName, '._')
% Skip this file if it starts with dot underline.
continue; % Jump to the bottom of the loop.
end
% Code to process the other files goes here...
end

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

제품

Community Treasure Hunt

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

Start Hunting!

Translated by