조회 수 2406 추천 수 0 댓글 0
Atachment
첨부 '1'
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

사진 파일 정렬하고 차례대로 넘버링 하려고 만듦 ㅋㅋ


#include <stdio.h>
#include <unistd.h>
#include <dirent.h>
#include <string.h>

int main(){
    DIR *dir_info;
    struct dirent *dir_entry;
    char new_name[128];
    int i;

    //mkdir( "test_A"     , 0755);

    dir_info = opendir( ".");

    if ( NULL != dir_info){
        //while( (dir_entry = readdir( dir_info)) ){
        for(i =0; (dir_entry = readdir( dir_info)); i++){
            if( strstr(dir_entry->d_name, ".jpeg") > 0 ){
                printf( "%s\n", dir_entry->d_name);

                memset(new_name, 0x00, 128);
                sprintf(new_name, "IMG_%04d.JPG", i);
                rename(dir_entry->d_name, new_name);
            }
        }
        closedir( dir_info);
    }
}


?

  1. WM미통기 - 10. 조건부확률

    Date2015.04.20 CategoryEtc Byhooni Views2250
    Read More
  2. [ios] StoryBoard(xib) 없이 프로젝트 만들기

    Date2015.02.12 CategoryDevelop Byhooni Views2230
    Read More
  3. [c#] BHO 한샘툴바랑 동현툴바..

    Date2013.04.23 CategoryDevelop Byhooni Views2208
    Read More
  4. [svn] Can't convert string from native encoding to 'UTF-8' 메시지가 나오는 경우

    Date2014.12.18 CategorySystem/OS Byhooni Views2196
    Read More
  5. [ios] 아이폰 앱 이름 및 버전 정보

    Date2015.03.24 CategoryDevelop Byhooni Views2195
    Read More
  6. [ios] 로컬에 있는 html 실행하기

    Date2015.02.10 CategoryDevelop Byhooni Views2182
    Read More
  7. [js] AngularJS 란?

    Date2015.11.26 CategoryDevelop Byhooni Views2177
    Read More
  8. [ios] 로컬에 있는 JS 파일 웹뷰에서 동적으로 실행하기

    Date2015.02.10 CategoryDevelop Byhooni Views2177
    Read More
  9. [ios] Xcode의 디버그 모드에서 콜스택

    Date2015.01.03 CategoryDevelop Byhooni Views2175
    Read More
  10. [ios] APNS에 사용할 인증서 만들기 (KeyChain에 있는 인증서 Export)

    Date2015.01.03 CategoryDevelop Byhooni Views2144
    Read More
  11. [mac] 패키지 매니저, MacPort

    Date2015.01.03 CategorySystem/OS Byhooni Views2140
    Read More
  12. [c#] 툴바 최근 버전(IE6, IE7 두가지 버전)

    Date2013.04.23 CategoryDevelop Byhooni Views2138
    Read More
  13. [ios] 최상위 ViewController 가져오기

    Date2015.10.12 CategoryDevelop Byhooni Views2119
    Read More
  14. [ios] ViewController Push할 때 애니메이션 효과

    Date2015.10.23 CategoryDevelop Byhooni Views2112
    Read More
  15. [android] N-Puzzle 게임

    Date2015.07.09 CategoryDevelop Byhooni Views2111
    Read More
  16. XE Core 1.8.18 본문 작성시 태그(html) 사라지는 버그

    Date2016.04.21 CategoryDevelop Byhooni Views2102
    Read More
Board Pagination Prev 1 ... 68 69 70 71 72 74 Next
/ 74