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. Delete files that are in use

Delete files that are in use

Scheduled Pinned Locked Moved C / C++ / MFC
sysadminquestion
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.
  • O Offline
    O Offline
    Ola Carlsson
    wrote on last edited by
    #1

    Hi, I need to delete files that are in use. I can´t restart my computer or neither exit programs that are using them. Any suggestions? Need to work on NT/2000 server. /Ola Carlsson

    D M S 3 Replies Last reply
    0
    • O Ola Carlsson

      Hi, I need to delete files that are in use. I can´t restart my computer or neither exit programs that are using them. Any suggestions? Need to work on NT/2000 server. /Ola Carlsson

      D Offline
      D Offline
      Daniel Turini
      wrote on last edited by
      #2

      MoveFileEx(szFile, NULL, MOVEFILE_DELAY_UNTIL_REBOOT); But you'll need to restart your computer. My latest articles: Desktop Bob - Instant CP notifications XOR tricks for RAID data protection

      1 Reply Last reply
      0
      • O Ola Carlsson

        Hi, I need to delete files that are in use. I can´t restart my computer or neither exit programs that are using them. Any suggestions? Need to work on NT/2000 server. /Ola Carlsson

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

        SHFileOperation, I think it can do that ... Max.

        1 Reply Last reply
        0
        • O Ola Carlsson

          Hi, I need to delete files that are in use. I can´t restart my computer or neither exit programs that are using them. Any suggestions? Need to work on NT/2000 server. /Ola Carlsson

          S Offline
          S Offline
          Scott H Settlemier
          wrote on last edited by
          #4

          That reminds me of a question: How can one determine the process(es) by which the file is in use? It's be nice to have a little utility that reports who has what files open.

          J 1 Reply Last reply
          0
          • S Scott H Settlemier

            That reminds me of a question: How can one determine the process(es) by which the file is in use? It's be nice to have a little utility that reports who has what files open.

            J Offline
            J Offline
            Joe Woodbury
            wrote on last edited by
            #5

            Scott H. Settlemier wrote: How can one determine the process(es) by which the file is in use? http://www.sysinternals.com/[^] Has just such a utility

            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