🫩🫩🫩🫩

  • kuneho@lemmy.world
    link
    fedilink
    arrow-up
    42
    ·
    4 months ago

    back in the XP days, I used a software called “Unlocker” just for this problem. It probably still exists, I don’t know, because since Windows 7, the easiest way to find out what process locks a file is to open Resource Monitor (Start search: resmon) and on the CPU tab, using the “Associated handles” list, you can search for the file name and see the process in question (and kill it).

    So yeah, Resource Monitor is a useful tool on Windows.

  • ArbitraryValue@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    29
    ·
    4 months ago

    What gets me is when I’m not allowed to remove an external drive. Deleting a file can be delayed until later but here I am with a physical object that I need to detach from my computer and first I need to play hide and seek with the OS.

    • Quetzalcutlass@lemmy.world
      link
      fedilink
      English
      arrow-up
      16
      ·
      4 months ago

      If this happens often, you can disable write caching for that drive. It’ll feel slightly slower (since it’s actually operating at the speed of the hardware instead of caching operations in RAM and gradually writing them to disk in the background), but you’ll be able to remove the drive almost instantly.

      • DrMartinu@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        12
        ·
        4 months ago

        I used to find it had something to do with the explorer thumbnailer finishing up but sort of not letting go. It would happen if I had pictures or videos on the USB drive, and if I got the error I could go to another folder like my documents, drag a picture into another folder, go look at the pretty new thumbnail, then I could remove the USB drive because the thumbnailer was ‘parked’ back on the C drive. Sounds like I’m making it up but I swear it worked.

      • kattfisk@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        2
        arrow-down
        1
        ·
        4 months ago

        Shouldn’t that happen automatically if the drive is identified as removable? And the real solution should be to tell the OS that it’s removable?

        • Quetzalcutlass@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          4 months ago

          I was having terrible performance problems in Windows a while back, and it turned out it had marked every drive as removable and the write cache was filling up due to an extremely slow external HDD, causing even the internal SSDs to grind to a halt until the buffer was flushed whenever a large amounts of writes were made to the HDD. Which, since the external drive was used for backups and large Steam games, was almost every other day.

    • marcos@lemmy.world
      link
      fedilink
      arrow-up
      5
      arrow-down
      1
      ·
      4 months ago

      Or stay with the basics and use lsof.

      Either way, not coming with that tool by default and forcing every usage of the file to lock it is a really stupid pair of mistakes.

  • pedz@lemmy.ca
    link
    fedilink
    arrow-up
    10
    ·
    4 months ago

    It’s one of the things that made me prefer using Linux a long long time ago. It’s nice to be able to rename, move, and delete files while they are used.

  • LoafedBurrito@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    8
    ·
    4 months ago

    “Hey Microsoft, i want to safely remove this hard drive so i don’t corrupt my data”

    “Nope, it’s being used by another program”

    “I shut down every program, nothing is open, please eject my Hard drive”

    “Nope, It’s being used by another program”

    **Proceed to just yank the cord out of the computer and flick off the screen.

  • Inucune@lemmy.world
    link
    fedilink
    arrow-up
    6
    ·
    4 months ago

    Process explorer, threads and handles tool, search the file name.

    Kill the process or at least you know who now.

  • skuzz@discuss.tchncs.de
    link
    fedilink
    arrow-up
    6
    arrow-down
    1
    ·
    4 months ago

    Mac does the same thing (as others have said) and you can at least sudo lsof and find it, but somehow filesystem access now is worse than Windows 95 era Excel spreadsheet file handles that never worked.

    Here’s what an operating system is peeps: Something that handles files and programs that live on top of it. That’s it.

    How is it none of them can’t do their basic function anymore?

  • moriquende@lemmy.world
    link
    fedilink
    arrow-up
    4
    arrow-down
    13
    ·
    4 months ago

    “Hey can I rent this apartment?”

    “Let me check… Seems like it’s already occupied”

    “Omg who is occupying it?”

    “Let me print out their name and contact details for you”

    • Omgpwnies@lemmy.world
      link
      fedilink
      English
      arrow-up
      6
      ·
      4 months ago

      Bad analogy.

      This would be more like the property management having a record of what apartments are rented, and having a second list of who is renting apartments (but not which one), and the landlord wanting to know who is renting apartment 420 so they can draw up eviction papers.

      • moriquende@lemmy.world
        link
        fedilink
        arrow-up
        1
        arrow-down
        1
        ·
        4 months ago

        The user probably wasn’t running as admin (elevated) while deleting the file, so as far as the system knows, he may not be allowed to know which process is accessing the file.

    • MNByChoice@midwest.social
      link
      fedilink
      arrow-up
      3
      ·
      4 months ago

      That only applies in this situation if the requestor is also the owner of the building, as in the OP it is assumed the requestor owns the computer.

      (On a multi-user system it is unlikely running Windows.)

      • moriquende@lemmy.world
        link
        fedilink
        arrow-up
        2
        arrow-down
        1
        ·
        4 months ago

        If you’ve ever worked at a company, you probably were running Windows while simultaneously not owning your computer.

        • MNByChoice@midwest.social
          link
          fedilink
          arrow-up
          1
          ·
          4 months ago

          Few run Windows in multi-user anymore. Most servers are doing Linux.

          I am assuming simultaneous, not one at a time multi-user. Which could happen.