Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. File Size

File Size

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++help
5 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    picasso2
    wrote on last edited by
    #1

    How can I read the file size and based on the size an action will be triggered? C++/VC++ Any help will be greatly appreciated

    J 2 A 3 Replies Last reply
    0
    • P picasso2

      How can I read the file size and based on the size an action will be triggered? C++/VC++ Any help will be greatly appreciated

      J Offline
      J Offline
      Jijo Raj
      wrote on last edited by
      #2

      Getting file length:- DWORD length; CFile file; file.Open ("c:\\myfile.dat", CFile::modeRead | CFile::shareDenyNone ); length = file.GetLength (); // Will give you the file length. Simple... isn't it ? ;) Regards, Jijo. Yesterday is history, Tomorrow is a mystery, But today is a present.

      1 Reply Last reply
      0
      • P picasso2

        How can I read the file size and based on the size an action will be triggered? C++/VC++ Any help will be greatly appreciated

        2 Offline
        2 Offline
        224917
        wrote on last edited by
        #3

        Are you looking to execute your code if file size is changed by some other user or application ?? greatest thing is to do wot others think you cant :)
        suhredayan@omniquad.com

        A 1 Reply Last reply
        0
        • P picasso2

          How can I read the file size and based on the size an action will be triggered? C++/VC++ Any help will be greatly appreciated

          A Offline
          A Offline
          Amit Dey
          wrote on last edited by
          #4

          GetFileSize() :omg:

          Hush,hush... thought I heard you call my name now. Kula Shaker. Amit Dey Latest articles at CP -
          Writing Word addins Office addin

          1 Reply Last reply
          0
          • 2 224917

            Are you looking to execute your code if file size is changed by some other user or application ?? greatest thing is to do wot others think you cant :)
            suhredayan@omniquad.com

            A Offline
            A Offline
            Anonymous
            wrote on last edited by
            #5

            When the file gets to certain size I will run another application

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups