Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6687913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:20:37+00:00 2026-05-26T05:20:37+00:00

I have a file that I can reach by pidl via IShellFolder . This

  • 0

I have a file that I can reach by pidl via IShellFolder. This file has the flag SFGAO_CANDELETE and its parent folder has the flag SFGAO_STORAGEANCESTOR only.

How can I delete the file?

Conditions:

  1. Files and folders are on USB device (digital camera and a phone).
  2. A solution should work at least on WinXP (Win2000 support would be wonderful)
  3. With no using of WPD.

I tried calling SHFileOperation on the pidl, but it requires a file-system path, not the GUID-style path I have. I asked about this on Experts Exchange, where I learned about IFileOperation, but that requires Windows Vista.

Sample:

parent folder::
media ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\\?\usb#vid_04e8&pid_6860&ms_comp_mtp&samsung_android#7&69f3c26&0&0000#{6ac27878-a6fa-4155-ba85-f98f491d4f33}\SID-{10001,SECZ9519043CHOHB,12351995904}\{0000000C-0000-0000-0000-000000000000} 
SFGAO_CANCOPY
SFGAO_CANMOVE
SFGAO_CANRENAME
SFGAO_CANDELETE
SFGAO_HASPROPSHEET
SFGAO_DROPTARGET
SFGAO_STORAGEANCESTOR
SFGAO_FOLDER
SFGAO_HASSUBFOLDER
SFGAO_CONTENTSMASK

file to delete:
some breathing.mp3 ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\\?\usb#vid_04e8&pid_6860&ms_comp_mtp&samsung_android#7&69f3c26&0&0000#{6ac27878-a6fa-4155-ba85-f98f491d4f33}\SID-{10001,SECZ9519043CHOHB,12351995904}\{0000000C-0000-0000-0000-000000000000}\{0000001B-0000-0000-0000-000000000000}\{0000001C-0000-0000-0000-000000000000}\{00000021-0000-0000-0000-000000000000} 
SFGAO_CANCOPY
SFGAO_CANMOVE
SFGAO_CANRENAME
SFGAO_CANDELETE
SFGAO_HASPROPSHEET
SFGAO_DROPTARGET
SFGAO_STREAM
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T05:20:38+00:00Added an answer on May 26, 2026 at 5:20 am

    See the answer I posted to this very same question (from you?) on the C++Builder Journal forums last month. In short, the only documented way I can find anywhere is to retreive the parent folder’s IContextMenu interface, and then invoke the delete verb on the desired file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a file that can be any thing like ZIP, RAR, txt, CSV,
Can anyone give me any pointers. I have a text file that contains dates
I have custom component that I can place in my layout file (XML) for
Assume that we have a large file which can be read in chunks of
I have xsd schema file which I can't change. Here is an excerpt that
I have a Mojolicious Lite script that gives out an executable file (user can
I have a loop that finds duplicate lines in a .ini file. I can
I have a File that COntains Strings in This Format: ACHMU)][2:s,161,(ACH Payment Sys Menus
I have a file that contains this <!-- CordovaVersion --> I want to replace
I have a method that converts a file to bytes so that I can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.