Views 748 Votes 0 Comment 0
Atachment
Attachment '1'
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print

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


#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. 리팩토링 계획안

    Date2017.05.15 CategoryDevelop Byhooni Views746
    Read More
  2. [ios] 앱에서 설정화면 호출하기

    Date2015.04.07 CategoryDevelop Byhooni Views743
    Read More
  3. [ios][swift] 초간단 TableView 샘플

    Date2016.06.27 CategoryDevelop Byhooni Views734
    Read More
  4. 캘리포니아 운전면허 족보

    Date2017.06.12 CategoryDevelop Byhooni Views734
    Read More
  5. [ios] Crashlytics, Fabfic 설치/설정

    Date2016.07.21 CategoryDevelop Byhooni Views724
    Read More
  6. [Javascript][Ajax] 자바스크립트 강의 산출물

    Date2019.10.05 CategoryDevelop Byhooni Views697
    Read More
  7. [android] Android N requires the IDE to be running with Java 1.8 or later 오류

    Date2016.08.30 CategoryDevelop Byhooni Views684
    Read More
  8. [ios] 비디오,네트워크,소셜로그인 테스트

    Date2017.04.04 CategoryDevelop Byhooni Views684
    Read More
  9. [matlab] 정보은닉 스테가노그래피(Steganography) 수업

    Date2016.10.03 CategoryDevelop Byhooni Views678
    Read More
  10. 정리할 자료.

    Date2015.07.02 CategoryDevelop Byhooni Views677
    Read More
  11. [js] Text 값을 클립보드에 복사하기

    Date2020.10.10 CategoryDevelop Byhooni Views675
    Read More
  12. Aspect Oriented Programming in Objective-C

    Date2015.05.18 CategoryDevelop Byhooni Views674
    Read More
  13. [swift] 실행시간 측정하기

    Date2021.09.14 CategoryDevelop Byhooni Views672
    Read More
  14. [ios] 여러 버전의 Xcode 사용하기

    Date2022.05.28 CategoryDevelop Byhooni Views664
    Read More
  15. [ios] Touch ID 적용 샘플 코드 (예제)

    Date2015.02.23 CategoryDevelop Byhooni Views663
    Read More
  16. [ios] WWDC 2015 샘플 소스 코드 통합파일

    Date2015.07.20 CategoryDevelop Byhooni Views657
    Read More
Board Pagination Prev 1 ... 49 50 51 52 53 Next
/ 53