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. I WANT TO WRITE PROGRAM DELETE THIS FILE

I WANT TO WRITE PROGRAM DELETE THIS FILE

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

    I problem with delete file,folder My USB have virus.I scan & clear it.Some file when I delete then messagebox:”can’t remove folder:the file or directory is corrupted & unrreadable.I can’t delete file”. Some folder delete then messagebox,too. I can write program delete this file,folder ? Thanks. Tuan_KD :-D :-D ,College 8,Vietnam.

    C M R D 4 Replies Last reply
    0
    • T tuan1111

      I problem with delete file,folder My USB have virus.I scan & clear it.Some file when I delete then messagebox:”can’t remove folder:the file or directory is corrupted & unrreadable.I can’t delete file”. Some folder delete then messagebox,too. I can write program delete this file,folder ? Thanks. Tuan_KD :-D :-D ,College 8,Vietnam.

      C Offline
      C Offline
      CPallini
      wrote on last edited by
      #2

      I think you'll better find a tool to erase the files and folders. Google is your friend. :)

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
      [My articles]

      1 Reply Last reply
      0
      • T tuan1111

        I problem with delete file,folder My USB have virus.I scan & clear it.Some file when I delete then messagebox:”can’t remove folder:the file or directory is corrupted & unrreadable.I can’t delete file”. Some folder delete then messagebox,too. I can write program delete this file,folder ? Thanks. Tuan_KD :-D :-D ,College 8,Vietnam.

        M Offline
        M Offline
        Maximilien
        wrote on last edited by
        #3

        format the usb key.

        N 1 Reply Last reply
        0
        • T tuan1111

          I problem with delete file,folder My USB have virus.I scan & clear it.Some file when I delete then messagebox:”can’t remove folder:the file or directory is corrupted & unrreadable.I can’t delete file”. Some folder delete then messagebox,too. I can write program delete this file,folder ? Thanks. Tuan_KD :-D :-D ,College 8,Vietnam.

          R Offline
          R Offline
          Rajesh R Subramanian
          wrote on last edited by
          #4

          If the directory is corrupted and unreadable, then chances are bleak that your program will delete it. You could try to format the drive (that's assuming there are no bad sectors).

          “Follow your bliss.” – Joseph Campbell

          1 Reply Last reply
          0
          • T tuan1111

            I problem with delete file,folder My USB have virus.I scan & clear it.Some file when I delete then messagebox:”can’t remove folder:the file or directory is corrupted & unrreadable.I can’t delete file”. Some folder delete then messagebox,too. I can write program delete this file,folder ? Thanks. Tuan_KD :-D :-D ,College 8,Vietnam.

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

            Do you have access to Linux, Ubuntu, or some other distribution? That might help.

            "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

            "Man who follows car will be exhausted." - Confucius

            1 Reply Last reply
            0
            • M Maximilien

              format the usb key.

              N Offline
              N Offline
              normanS
              wrote on last edited by
              #6

              If the OP has the same type of virus I picked up, formatting the USB stick will not help - the virus (which was already on the hard disk from some previous dirty USB stick) just puts the infection back. The company antivirus (McAfee IIRC) could detect the virus on the USB stick, but it ignored the hard disk infection. In the end, I restarted Windows in safe mode, and deleted the offending file and directory on the hard disk and on the USB stick.

              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