Renaming Files Program not doing task, New to MATLAB
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
I have have this code to rename files, but when I run it I am getting the following results.
Any help would be greatly appreciated... I am attempting to rename a bunch of files from Untitled.0001 to 1,2,3...jpg.
댓글 수: 0
답변 (1개)
Image Analyst
2016년 8월 15일
0 개 추천
No, you did not get the second screenshot from running the first screenshot. I know because the second screenshot will have filetype end in *.jpg while your first screenshot had filetype ending in untitled.0001.jpg. That could NOT happen with the code on the right.
댓글 수: 8
Michael Cimorelli
2016년 8월 15일
Image Analyst
2016년 8월 15일
That means that there are no JPEG format files in your folder.
Michael Cimorelli
2016년 8월 16일
Image Analyst
2016년 8월 16일
The folders are different. "you" is not the current folder but the images are in the current folder. Change c:\users\you\...... to pwd or "C:\users\Michael......" and it should work
folder = pwd; % Set to current folder.
% or
folder = 'c:\users\Michael....whatever'
Michael Cimorelli
2016년 8월 16일
Image Analyst
2016년 8월 16일
Is this on a Windows system? I know Windows can take slashes in either direction. If it's linux, then I'm not sure.
Michael Cimorelli
2016년 8월 16일
Directories do not start with 'C:' on Mac OS, and directories are separated with '/'. Use:
folder = '/Users/MichaelCimonrelli/Documents/MATLAB/NameChange';
You can use
pwd
to have a look at how a correct dirname looks like.
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!