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. Deleting Files

Deleting Files

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++tools
4 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.
  • B Offline
    B Offline
    BobInNJ
    wrote on last edited by
    #1

    I am working on a Windows program in C++ that downloads a variable number of files into a directory. Before I do the download, I want to delete all the files in the directory before downloading them. I do not want to write a separate script to do this. I want the C++ program to do it. What is the easiest way to do this? Bob

    C D 2 Replies Last reply
    0
    • B BobInNJ

      I am working on a Windows program in C++ that downloads a variable number of files into a directory. Before I do the download, I want to delete all the files in the directory before downloading them. I do not want to write a separate script to do this. I want the C++ program to do it. What is the easiest way to do this? Bob

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #2

      something like this Delete folders, subfolders and files easily[^] (be sure to read the comments for fixes to the article)

      image processing toolkits | batch image processing

      1 Reply Last reply
      0
      • B BobInNJ

        I am working on a Windows program in C++ that downloads a variable number of files into a directory. Before I do the download, I want to delete all the files in the directory before downloading them. I do not want to write a separate script to do this. I want the C++ program to do it. What is the easiest way to do this? Bob

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

        BobInNJ wrote:

        What is the easiest way to do this?

        I suppose SHFileOperation() would be.

        "One man's wage rise is another man's price increase." - Harold Wilson

        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

        "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

        B 1 Reply Last reply
        0
        • D David Crow

          BobInNJ wrote:

          What is the easiest way to do this?

          I suppose SHFileOperation() would be.

          "One man's wage rise is another man's price increase." - Harold Wilson

          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

          "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

          B Offline
          B Offline
          BobInNJ
          wrote on last edited by
          #4

          Thanks for the responses. Based upon the responses I received I was able to write the code I wanted. Bob

          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