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#
  4. Cannot deleted "large" files with ShellAPI

Cannot deleted "large" files with ShellAPI

Scheduled Pinned Locked Moved C#
helpquestion
2 Posts 2 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.
  • S Offline
    S Offline
    snipsi
    wrote on last edited by
    #1

    I have created an application that displays images and I want to add the possibility to delete files directly from the app. To have the file not deleted from the system directly but have it moved to the trash bin, I utilized the ShellAPI (SHFileOperation). So far, the implementation should be okay: when I try delete an "small" file (~200k) I am asked if I really want to delete this file and after confirmation it has moved to the trash bin. However, "large" files (~4MB) cannot be deleted but I get the Windows error message: "The file cannot be read from the file system" (something like that). I am pretty puzzled, since I have no clue why my implementation works for small files but not for large ones. Any ideas???

    J 1 Reply Last reply
    0
    • S snipsi

      I have created an application that displays images and I want to add the possibility to delete files directly from the app. To have the file not deleted from the system directly but have it moved to the trash bin, I utilized the ShellAPI (SHFileOperation). So far, the implementation should be okay: when I try delete an "small" file (~200k) I am asked if I really want to delete this file and after confirmation it has moved to the trash bin. However, "large" files (~4MB) cannot be deleted but I get the Windows error message: "The file cannot be read from the file system" (something like that). I am pretty puzzled, since I have no clue why my implementation works for small files but not for large ones. Any ideas???

      J Offline
      J Offline
      Judah Gabriel Himango
      wrote on last edited by
      #2

      Is the recycle bin set to not accept files larger than a certain size?

      Tech, life, family, faith: Give me a visit. I'm currently blogging about: Check out this cutie The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

      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