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. Programmaticaly delete a file.

Programmaticaly delete a file.

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
7 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.
  • V Offline
    V Offline
    vcseeker
    wrote on last edited by
    #1

    Hi all, I am writing a program that requires deleting a file stored in the disk programmatically .I am wondering if we can do that? Could somebody help me on this. Regards.

    J 1 Reply Last reply
    0
    • V vcseeker

      Hi all, I am writing a program that requires deleting a file stored in the disk programmatically .I am wondering if we can do that? Could somebody help me on this. Regards.

      J Offline
      J Offline
      Jens Doose
      wrote on last edited by
      #2

      Try DeleteFile Jens

      V 1 Reply Last reply
      0
      • J Jens Doose

        Try DeleteFile Jens

        V Offline
        V Offline
        vcseeker
        wrote on last edited by
        #3

        Thanks a lot Jens, I solved my problem.

        D 1 Reply Last reply
        0
        • V vcseeker

          Thanks a lot Jens, I solved my problem.

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          You also have SHFileOperation() at your disposal.

          V 1 Reply Last reply
          0
          • D David Crow

            You also have SHFileOperation() at your disposal.

            V Offline
            V Offline
            vcseeker
            wrote on last edited by
            #5

            Hi davi , Thanks a lot for guidance. Regards.:)

            M 1 Reply Last reply
            0
            • V vcseeker

              Hi davi , Thanks a lot for guidance. Regards.:)

              M Offline
              M Offline
              melwyn
              wrote on last edited by
              #6

              You could also try CFile::Remove()

              B 1 Reply Last reply
              0
              • M melwyn

                You could also try CFile::Remove()

                B Offline
                B Offline
                basementman
                wrote on last edited by
                #7

                Or, the CRT function remove().  onwards and upwards...

                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