How to use 'dir' to list files in another directory with a string
조회 수: 3 (최근 30일)
이전 댓글 표시
Guys -
I have a variable that is a string describing a path (x = \\drive\folder1\folder2). How can I use 'dir' to create a list of all files in that directory without switching to the directory to do it? I've tried things like
list = dir('%s',x)
but that doesn't work.
댓글 수: 0
답변 (1개)
Azzi Abdelmalek
2013년 11월 8일
편집: Azzi Abdelmalek
2013년 11월 8일
x='E:matlab'
d = dir(x)
f={d.name}
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 File Operations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!