如何在回收站中删除路径太长的文件夹或文件? [英] How can I delete a folder or file with path too long in recycle bin?
问题描述
我有程序删除和复制一些文件夹或文件与长路径(当lenght> MAX_PATH)在这个程序中,我使用前缀 \\?\
这给我可能删除文件夹或文件与长路径,但只在简单的函数 Delete()
。我需要删除回收站中的文件,为此我需要使用 SHFileOperation
函数,给我可能删除回收站中的文件,但此功能不支持前缀 \\?\
。任何人都可以帮助我这个问题?
I have the program that deletes and copies some folders or files with long path (when lenght > MAX_PATH) In this program I use the prefix \\?\
that gives me the possibility delete folders or files with long path but only in simple function Delete()
. I need to delete files in Recycle Bin and for this I need use the SHFileOperation
function that gives me possibility delete files in the recycle bin, but this function does not support the prefix \\?\
. Can anybody help me with this issue?
SHFileOperation有其他选择。
如何绕过这个问题?
Is there some alternative for SHFileOperation. How can I bypass this problem?
一些链接:
- 前缀
\\?\
- 有关长途径
- SHFileOperation
- Prefix
\\?\
- Some about Long Path
- SHFileOperation
推荐答案
回收站是一个特殊的shell文件夹。它是壳的一部分。然而shell具有路径不能长于MAX_PATH的限制。因此,同样的限制也适用于回收站。
The recycle bin is a special shell folder. It is part of the shell. The shell however has the limitation that paths must not be longer than MAX_PATH. So the same limitation applies to the recycle bin.
您根本无法将包含长路径的文件/文件夹放在回收站中。不可能。
You simply can not put files/folders with long paths in the recycle bin. Not possible.
这篇关于如何在回收站中删除路径太长的文件夹或文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!