How can I delete a folder or file with a path too long in the recycle bin?

I have a program that deletes and copies some folders or files with a long path (when long> MAX_PATH). In this program, I use a prefix \\?\that gives me the ability to delete folders or files with a long path, but only in a simple function Delete(). I need to delete files in the Recycle Bin, and for this I need to use a function SHFileOperationthat gives me the ability to delete files in the Recycle Bin, but this function does not support the prefix \\?\. Can someone help me on this?

Is there an alternative to SHFileOperation. How can I get around this problem?

Some links:

+5
source share
1 answer

The recycle bin is a special shell folder. This is part of the shell. However, the shell has the limitation that paths should not be longer than MAX_PATH. The same restriction applies to the basket.

You simply cannot put files / folders with long paths into the trash. Impossible.

+6
source

All Articles