Revision 2 of 3, by WikiArchive on 11-4-2026. The page as it is now.
File Into Trash/de
https://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Windows_logo_-_2012.svg/50px-Windows_logo_-_2012.svg.png
Dieser Artikel behandelt ausschließlich Windows.
Siehe auch: Multiplatform Programming Guide/de
│ Deutsch (de) │ English (en) │
Zurück zur Seite Code Beispiele.
Dieser Artikel beschäftigt sich mit der Windowsprogrammierung.
Die Funktion verschiebt eine Datei in den Papierkorb.
uses
ShellAPI, FileUtil, ...;
...
function funDateiInPapierkorbVerschieben(strDateiname: string): boolean;
var
Dateistruktur: TSHFileOpStruct;
begin
FillChar(Dateistruktur, SizeOf(Dateistruktur), 0);
with Dateistruktur do
begin
wFunc := FO_DELETE;
// Lässt Umlaute usw. im Dateinamen zu
pFrom := PChar(UTF8ToSys(strDateiname));
fFlags := FOF_ALLOWUNDO + FOF_NOCONFIRMATION + FOF_SILENT;
end;
Result := ShFileOperation(Dateistruktur) = 0;
end;
...From the Free Pascal wiki, page "File Into Trash/de", as the Internet Archive kept it on 2023-03-30. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.
