Rename file with date
조회 수: 5 (최근 30일)
이전 댓글 표시
Dear all..
i have many file with name by modified julian date..i have used matlab progrrming JD2CAL (Converts Julian date to calendar date using algorithm).. It is succesfull but the problem is when day in January , November and December..For example 1112007.txt represent for 11/1/2007 but problem for file date 1/11/2007 ..it also will rename the file with 1112007.txt..So, the data for this two date will mix together..how i can solve it?
댓글 수: 1
답변 (2개)
Azzi Abdelmalek
2012년 7월 16일
편집: Azzi Abdelmalek
2012년 8월 8일
file=datestr(datenum(date),'dd/mm/yyyy')
file([3,6])=[]
file=[file '.txt']
댓글 수: 3
Image Analyst
2012년 8월 8일
joo tan, you'll note that you did not give any examples of your initial, original filenames/strings, or the desired, ending filenames. You just gave one filename so it's not clear what you are starting with. We don't know if you have actual filenames that you need to convert, or some strings that you want to build up with the current date that you will then use to create the file, or something else. If you clarified your situation, you'd eliminate all the confusion and guessing that you're causing.
Star Strider
2012년 8월 9일
참고 항목
카테고리
Help Center 및 File Exchange에서 Calendar에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!