是否有将文件移动到回收站的 Winapi 方法? [英] Is There a Winapi way to Move a File to The Recycling Bin?

查看:33
本文介绍了是否有将文件移动到回收站的 Winapi 方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我研究了很多不同的方法,但其中大多数需要将文件添加到 System32,而我正在寻找一条可以让您将某些内容移动到回收站而不将任何内容添加到系统中的行计算机,因为我想要可以立即在所有 Windows 计算机上运行的东西.请放心,删除不会删除任何主要文件,并会要求确认.我正在考虑在 C++ 中使用 system("") 来运行该行.

I've looking into a lot of different methods, but most of them require adding a file to System32, while I'm looking for a line that would allow you to move something to the recycle bin without anything being added to a computer, because I want something that would work on all Windows computers immediately. Rest assured that the deletion will not delete any major files and will ask for confirmation. I am thinking of using system("") in C++ to run the line.

推荐答案

参见 SHFileOperationFOF_ALLOWUNDO.

这篇关于是否有将文件移动到回收站的 Winapi 方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆