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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Deleting a file

Deleting a file

Scheduled Pinned Locked Moved C / C++ / MFC
help
5 Posts 3 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.
  • K Offline
    K Offline
    kyledunn
    wrote on last edited by
    #1

    Can someone share a sample of code that deletes a file when the path is known. Thanks for any help. Kyle

    J 1 Reply Last reply
    0
    • K kyledunn

      Can someone share a sample of code that deletes a file when the path is known. Thanks for any help. Kyle

      J Offline
      J Offline
      Joaquin M Lopez Munoz
      wrote on last edited by
      #2

      I'm surprised you didn't find DeleteFile yourself. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

      K 1 Reply Last reply
      0
      • J Joaquin M Lopez Munoz

        I'm surprised you didn't find DeleteFile yourself. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

        K Offline
        K Offline
        kyledunn
        wrote on last edited by
        #3

        Me too! Being new to C++ I searched for "delete file" on this site and when I didn't find a clear answer I asked the silly question. I should have tried the on-line help first. Please accept my apology. Kyle

        J 1 Reply Last reply
        0
        • K kyledunn

          Me too! Being new to C++ I searched for "delete file" on this site and when I didn't find a clear answer I asked the silly question. I should have tried the on-line help first. Please accept my apology. Kyle

          J Offline
          J Offline
          Joaquin M Lopez Munoz
          wrote on last edited by
          #4

          Excuse my being too ironic. You don't have to apologize for anything at all, this is a free forum :) Regards. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

          C 1 Reply Last reply
          0
          • J Joaquin M Lopez Munoz

            Excuse my being too ironic. You don't have to apologize for anything at all, this is a free forum :) Regards. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

            C Offline
            C Offline
            Carlos Antollini
            wrote on last edited by
            #5

            Joaquin, you are very hard with that Guy... He only wants to knows how to use the DeleteFile function...

            if(DeleteFile("C:\\MyPath\\File.tmp"))
            AfxMessageBox("The file was deleted...");

            Best Regards Carlos Antollini. www.wanakostudios.com Sonork ID 100.10529 cantollini

            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