CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Threaded View

  1. #1
    Join Date
    Sep 2017
    Posts
    2

    File could not be loaded due to size

    Hi,
    I was using the C program to upload a file, while this month the file was little bigger which is above 2 GB and the program was not able to detect that file, where when i split the file into two it can able to show that and uploading,
    KIndly let me know any idea you have about this, and also let me know if any further information required??

    In this code i am getting the warning File NOT AVAILABLE with 2 GB file in the upload path

    Code:
    fp = fopen64(text_path, "r"); /* fopen64() for open a 64-bits (or) large file */
    /**-- warn if file is not present ---**/
    if (fp == NULL) {
         printf("File:%s NOT AVAILABLE\n", text_path);
    } else {
         /**--- else proceed with upload ----**/
         /** Let's check the header first **/
         head_check = get_head_info(text_path, db_files[ctr].date_pos, db_files[ctr].freq_pos, db_files[ctr].exp_date, db_files[ctr].exp_freq);
         switch (head_check) {
              case 0 : /** Mark as ok for upload**/
                   printf("File :%s\tDate:%s\tFrq.:%s -> ", db_files[ctr].file_name, db_files[ctr].exp_date, db_files[ctr].exp_freq);
                   if (normal_yn == 'S' || normal_yn == 's') {
                        mark = get_yes_no("OK to load :");
                   } else {
                        mark = 1;
                        printf("\b\b\bOK to Load :-> Y\n");
                   }
    
                   if(mark == 1)
                        strcpy(db_files[ctr].upload_y_n, "Y");
    
                   break;
    Last edited by 2kaud; September 6th, 2017 at 03:43 AM. Reason: Added code tags

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured